diff options
-rw-r--r-- | pull/cgit.py | 1 | ||||
-rw-r--r-- | pull/utils.py | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/pull/cgit.py b/pull/cgit.py index 663eebf..86a94ea 100644 --- a/pull/cgit.py +++ b/pull/cgit.py @@ -8,7 +8,6 @@ import logging import os import os.path import shutil -import socket from pull.utils import chdir, check_output, run diff --git a/pull/utils.py b/pull/utils.py index 6ffccd1..84337e8 100644 --- a/pull/utils.py +++ b/pull/utils.py @@ -10,10 +10,9 @@ import subprocess def check_output(*args, stdout=subprocess.PIPE, **kwargs): - result = subprocess.run(args, stdout=stdout, stderr=subprocess.STDOUT, - encoding='utf-8', **kwargs) try: - result.check_returncode() + result = subprocess.run(args, stdout=stdout, stderr=subprocess.STDOUT, + encoding='utf-8', check=True, **kwargs) if stdout != subprocess.DEVNULL: if result.stdout is None: logging.debug('%s', args) |