Skip to content

Commit

Permalink
Merge branch 'dev' into features/#112-option-testmode
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed Feb 23, 2021
2 parents 8574eaf + f74b620 commit e167774
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Added
-----


* Include description of the egon-data workflow in our documentation
* Include description of the egon-data workflow in our documentation
`#23 <https://github.com/openego/eGon-data/issues/23>`_
* There's now a wrapper around `subprocess.run` in
`egon.data.subprocess.run`. This wrapper catches errors better and
displays better error messages that Python's built-in function. Use
displays better error messages than Python's built-in function. Use
this wrapper wenn calling other programs in Airflow tasks.

* You can now override the default database configuration by putting a
Expand Down
3 changes: 2 additions & 1 deletion src/egon/data/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def run(*args, **kwargs):
kwargs["check"] = kwargs.get("check", True)
kwargs["capture_output"] = kwargs.get("capture_output", True)
try:
subprocess.run(*args, **kwargs)
result = subprocess.run(*args, **kwargs)
except subprocess.CalledProcessError as cpe:
raise CalledProcessError(
cpe.returncode, cpe.cmd, output=cpe.output, stderr=cpe.stderr
) from None
return result

0 comments on commit e167774

Please sign in to comment.