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

convwatch.py: make it run on Python 3

Change-Id: Iaf0303f5268233ff34a4d4a31d1955fc6f58e7e2
üst b8be6d8a
...@@ -340,7 +340,7 @@ def identify(imagefile): ...@@ -340,7 +340,7 @@ def identify(imagefile):
result, _ = process.communicate() result, _ = process.communicate()
if process.wait() != 0: if process.wait() != 0:
raise Exception("identify failed") raise Exception("identify failed")
if result.partition("\n")[0] != "1": if result.partition(b"\n")[0] != b"1":
print("identify result: " + result) print("identify result: " + result)
print("DIFFERENCE in " + imagefile) print("DIFFERENCE in " + imagefile)
...@@ -365,13 +365,13 @@ def compareImages(file): ...@@ -365,13 +365,13 @@ def compareImages(file):
print("DIFFERENT NUMBER OF IMAGES FOR: " + file) print("DIFFERENT NUMBER OF IMAGES FOR: " + file)
def compareAllImages(dirs, suffix): def compareAllImages(dirs, suffix):
print "compareAllImages..." print("compareAllImages...")
for dir in dirs: for dir in dirs:
files = filelist(dir, suffix) files = filelist(dir, suffix)
# print("compareAllImages:" + str(files)) # print("compareAllImages:" + str(files))
for f in files: for f in files:
compareImages(f) compareImages(f)
print "...compareAllImages done" print("...compareAllImages done")
def parseArgs(argv): def parseArgs(argv):
......
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