diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-19 15:39:22 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-19 15:40:40 +0200 |
| commit | 1e3e9edb3890558b7160fc29024ca6ec2b9fda58 (patch) | |
| tree | ea58ba3b572feeb93ad813d6af244b05e760f67b | |
| parent | ba8a05409250764c7b6ca100ce03c585ff866c63 (diff) | |
| download | allocbench-1e3e9edb3890558b7160fc29024ca6ec2b9fda58.tar.gz allocbench-1e3e9edb3890558b7160fc29024ca6ec2b9fda58.zip | |
[util] export CmdType
| -rw-r--r-- | allocbench/util.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/allocbench/util.py b/allocbench/util.py index 3432996..bce7b17 100644 --- a/allocbench/util.py +++ b/allocbench/util.py @@ -49,10 +49,12 @@ def get_logger(path: str) -> logging.Logger: logger = get_logger(__file__) +CmdType = Union[str, List[str]] + # yapf: disable def run_cmd( # pylint: disable=too-many-arguments - cmd: Union[str, List[str]], + cmd: CmdType, output_verbosity=2, capture=False, shell=False, @@ -156,7 +158,7 @@ def print_license_and_exit(): # https://stackoverflow.com/questions/22058048/hashing-a-file-in-python -def sha1sum(filename: str) -> str: +def sha1sum(filename: PathType) -> str: """Return sha1sum of a file""" sha1 = hashlib.sha1() barray = bytearray(64 * 1024) |
