summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-04-27 16:01:24 +0200
committerMichael Stahl <mstahl@redhat.com>2012-04-27 16:14:35 +0200
commitd5ddbe4c3f71c5e8f1667c25e20bbcd565850374 (patch)
treed3607bb2efb75f94d1a258a5ada448d4c9aac01c
parente6d28ac3aadce1a130ad90e8281fef6aed95329e (diff)
convwatch.py: subprocess.check_output only in Python 2.7+
-rwxr-xr-xbin/convwatch.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/convwatch.py b/bin/convwatch.py
index 78802343077b..e0fb05d4c8e2 100755
--- a/bin/convwatch.py
+++ b/bin/convwatch.py
@@ -336,7 +336,10 @@ def mkAllImages(dirs, suffix, resolution, reference):
def identify(imagefile):
argv = ["identify", "-format", "%k", imagefile]
- result = subprocess.check_output(argv)
+ process = subprocess.Popen(argv, stdout=subprocess.PIPE)
+ result, _ = process.communicate()
+ if process.wait() != 0:
+ raise Exception("identify failed")
if result.partition("\n")[0] != "1":
print("identify result: " + result)
print("DIFFERENCE in " + imagefile)