# HG changeset patch # User Oleg Oshmyan # Date 1290562959 0 # Node ID 3d535503161f3a3c3b0286bfcbfd055c6678a4e6 # Parent dc4be35d17e03c9aa53725c88a0a150fe6162b78 hasattr -> try diff -r dc4be35d17e0 -r 3d535503161f 2.00/zipfile3.py --- a/2.00/zipfile3.py Fri Oct 15 22:17:31 2010 +0000 +++ b/2.00/zipfile3.py Wed Nov 24 01:42:39 2010 +0000 @@ -634,8 +634,10 @@ # we're out of raw bytes (both from the file and # the local buffer); flush just to make sure the # decompressor is done - if hasattr(self.dc, 'flush'): + try: newdata += self.dc.flush() + except AttributeError: + pass # prevent decompressor from being used again self.dc = None