Kaydet (Commit) d5ddbe4c authored tarafından Michael Stahl's avatar Michael Stahl

convwatch.py: subprocess.check_output only in Python 2.7+

üst e6d28ac3
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment