summaryrefslogtreecommitdiff
path: root/support/lib
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2014-12-25 15:16:42 +0100
committerMichael Schwarz <michi.schwarz@gmail.com>2014-12-25 15:16:42 +0100
commitd08e4be25f157d59075e0b2a669e6388cb462474 (patch)
tree29b1363948f6dc83fff4c68052b6924f81d215d8 /support/lib
parent2433482b8768533244480bf15ba759eee3f51969 (diff)
parentbdf3ae0ae3d66235bbff5710ffe1b34e9d7f12d2 (diff)
downloadpogojig-d08e4be25f157d59075e0b2a669e6388cb462474.tar.gz
pogojig-d08e4be25f157d59075e0b2a669e6388cb462474.tar.bz2
pogojig-d08e4be25f157d59075e0b2a669e6388cb462474.zip
Merge branch 'master' into no-examples
Conflicts: .gitignore
Diffstat (limited to 'support/lib')
-rw-r--r--support/lib/util.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/support/lib/util.py b/support/lib/util.py
index bede240..8b65e58 100644
--- a/support/lib/util.py
+++ b/support/lib/util.py
@@ -1,6 +1,10 @@
import contextlib, subprocess, tempfile, shutil, re, os
+class UserError(Exception):
+ pass
+
+
@contextlib.contextmanager
def TemporaryDirectory():
dir = tempfile.mkdtemp()
@@ -15,7 +19,8 @@ def command(args):
process = subprocess.Popen(args)
process.wait()
- assert not process.returncode
+ if process.returncode:
+ raise UserError('Command failed: {}'.format(' '.join(args)))
def bash_escape_string(string):