From 6e7d7bcc47c07b31795fc99672db469c6d363e48 Mon Sep 17 00:00:00 2001 From: beville Date: Thu, 24 Jan 2013 01:33:21 +0000 Subject: [PATCH] Fixed an issue with export git-svn-id: http://comictagger.googlecode.com/svn/trunk@334 6c5673fe-1810-88d6-992b-cd32ca31540c --- comicarchive.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/comicarchive.py b/comicarchive.py index 17e8f2b..74724a2 100644 --- a/comicarchive.py +++ b/comicarchive.py @@ -201,7 +201,8 @@ class ZipArchiver: zout = zipfile.ZipFile (self.path, 'w') for fname in otherArchive.getArchiveFilenameList(): data = otherArchive.readArchiveFile( fname ) - zout.writestr( fname, data ) + if data is not None: + zout.writestr( fname, data ) zout.close() #preserve the old comment @@ -209,7 +210,8 @@ class ZipArchiver: if comment is not None: if not self.writeZipComment( self.path, comment ): return False - except: + except Exception as e: + print "Error while copying to {0}: {1}".format(self.path, e) return False else: return True