Skip to content

Commit

Permalink
Merge pull request #329 from re0wiki/dev
Browse files Browse the repository at this point in the history
catch CalledProcessError
  • Loading branch information
CCXXXI committed Sep 6, 2023
2 parents 3380899 + 5f535cb commit bfc48f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/restyled.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
auto: true
commit_template: "style: restyle by ${restyler.name}"
restylers:
- "*"
- black
5 changes: 5 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion jobs/jobs_.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from collections.abc import Callable, Iterable
from importlib import import_module
from pathlib import Path
from subprocess import run
from subprocess import run, CalledProcessError


class Job(ABC):
Expand Down Expand Up @@ -37,6 +37,9 @@ def run(self, simulate=False, capture_output=False):
shell=True,
check=True,
)
except CalledProcessError as e:
logging.error(e)
return ""
finally:
logging.info(cmd)
logging.info("=" * 16 + "end" + "=" * 16)
Expand Down

0 comments on commit bfc48f3

Please sign in to comment.