aboutsummaryrefslogtreecommitdiffstats
path: root/bsie/reader/stat.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2022-11-25 14:59:17 +0100
committerMatthias Baumgartner <dev@igsor.net>2022-11-25 14:59:17 +0100
commita294bbe0622911bcd6df37c38865a4c0eb290593 (patch)
treef038ed8d4f04c63991939e13e61ae170de4e2c57 /bsie/reader/stat.py
parent9389c741bdbbca9adbff6099d440706cd63deac4 (diff)
parent3e6a69ce7f109f0fd4352507ad60d58d4cbd24a7 (diff)
downloadbsie-a294bbe0622911bcd6df37c38865a4c0eb290593.tar.gz
bsie-a294bbe0622911bcd6df37c38865a4c0eb290593.tar.bz2
bsie-a294bbe0622911bcd6df37c38865a4c0eb290593.zip
Merge branch 'mb/tools' into develop
Diffstat (limited to 'bsie/reader/stat.py')
-rw-r--r--bsie/reader/stat.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/bsie/reader/stat.py b/bsie/reader/stat.py
index f0b83fb..592d912 100644
--- a/bsie/reader/stat.py
+++ b/bsie/reader/stat.py
@@ -8,7 +8,7 @@ Author: Matthias Baumgartner, 2022
import os
import typing
-# inner-module imports
+# bsie imports
from bsie.base import reader, errors
# exports
@@ -22,13 +22,11 @@ __all__: typing.Sequence[str] = (
class Stat(reader.Reader):
"""Read and return the filesystem's stat infos."""
- CONTENT_TYPE = typing.Union[os.stat_result]
-
- def __call__(self, path: str) -> CONTENT_TYPE:
+ def __call__(self, path: str) -> os.stat_result:
try:
return os.stat(path)
- except Exception:
- raise errors.ReaderError(path)
+ except Exception as err:
+ raise errors.ReaderError(path) from err
## EOF ##