Make sure out data is set in the case of pages that don't need to be resized

git-svn-id: http://comictagger.googlecode.com/svn/trunk@586 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville@gmail.com 2013-04-10 20:46:59 +00:00
parent 9f4a4b0eb0
commit 31b76fba92

View File

@ -125,6 +125,7 @@ def main():
for idx in range(ca.getNumberOfPages()):
name = ca.getPageName( idx )
in_data = ca.getPage( idx )
out_data = in_data
if in_data is not None:
try:
im = Image.open(StringIO.StringIO(in_data))
@ -143,7 +144,7 @@ def main():
except IOError:
#doesn't appear to be an image
out_data = in_data
pass
else:
#page is empty?? nothing to write
@ -152,7 +153,7 @@ def main():
sys.stdout.write('.')
sys.stdout.flush()
#Generate a new name for the page file
#write out the new resized image
zout.writestr(name, out_data)