summaryrefslogtreecommitdiff
path: root/archey3
diff options
context:
space:
mode:
authorLaurie Clark-Michalek <bluepeppers@archlinux.us>2011-02-20 23:36:02 +0000
committerLaurie Clark-Michalek <bluepeppers@archlinux.us>2011-02-20 23:36:02 +0000
commit170b495799bdb7b8d00d52f1cab1ee52b0e01512 (patch)
tree5ad904c5b33d3de089ad07158687c14f8b229270 /archey3
parent2386683d94765e2d4411bd5003378563c6ad9d13 (diff)
Output error message instead of crash if the screenshot command returns a non-zero value.
Diffstat (limited to 'archey3')
-rwxr-xr-xarchey35
1 files changed, 4 insertions, 1 deletions
diff --git a/archey3 b/archey3
index 7abad8b..b36280c 100755
--- a/archey3
+++ b/archey3
@@ -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: