diff options
author | Laurie Clark-Michalek <bluepeppers@archlinux.us> | 2011-02-20 23:36:02 +0000 |
---|---|---|
committer | Laurie Clark-Michalek <bluepeppers@archlinux.us> | 2011-02-20 23:36:02 +0000 |
commit | 170b495799bdb7b8d00d52f1cab1ee52b0e01512 (patch) | |
tree | 5ad904c5b33d3de089ad07158687c14f8b229270 /archey3 | |
parent | 2386683d94765e2d4411bd5003378563c6ad9d13 (diff) |
Output error message instead of crash if the screenshot command returns a non-zero value.
Diffstat (limited to 'archey3')
-rwxr-xr-x | archey3 | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -421,7 +421,10 @@ def screenshot(): print('Say Cheese!') sys.stdout.flush() - subprocess.check_call(['import', '-window', 'root', ctime().replace(' ','_')+'.jpg']) + try: + subprocess.check_call(['import', '-window', 'root', ctime().replace(' ','_')+'.jpg']) + except subprocess.CalledProcessError as e: + print('Screenshot failed with return code {0}.'.format(e.returncode)) def render(instance): try: |