diff options
author | Michael Schwarz <michi.schwarz@gmail.com> | 2014-12-20 22:22:04 +0100 |
---|---|---|
committer | Michael Schwarz <michi.schwarz@gmail.com> | 2014-12-21 02:15:45 +0100 |
commit | c74efa59dc37b06cc1aeddd0ba736552a5b9f35e (patch) | |
tree | 19ea446ef3c551896cead0cf2fe5f24e78d2a4db /support/lib | |
parent | e309a206be4d5c0cd082ef557633d477b1638850 (diff) | |
download | pogojig-c74efa59dc37b06cc1aeddd0ba736552a5b9f35e.tar.gz pogojig-c74efa59dc37b06cc1aeddd0ba736552a5b9f35e.tar.bz2 pogojig-c74efa59dc37b06cc1aeddd0ba736552a5b9f35e.zip |
Rewritten unit conversion methods of inkex.py to properly handle viewport settings.
Diffstat (limited to 'support/lib')
-rw-r--r-- | support/lib/util.py | 7 |
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): |