Fixed several Python3 syntax errors

Change-Id: I8634ddb31da0297c06e39b968ce1a209b0d78614
This commit is contained in:
Alex Gaynor 2014-05-16 10:09:55 -04:00
parent 04b486e10f
commit 717485a64f
2 changed files with 4 additions and 4 deletions

View File

@ -89,15 +89,15 @@ class CompressingFileReader(object):
return ''
x = self._f.read(*a, **kw)
if x:
self.crc32 = zlib.crc32(x, self.crc32) & 0xffffffffL
self.crc32 = zlib.crc32(x, self.crc32) & 0xffffffff
self.total_size += len(x)
compressed = self._compressor.compress(x)
if not compressed:
compressed = self._compressor.flush(zlib.Z_SYNC_FLUSH)
else:
compressed = self._compressor.flush(zlib.Z_FINISH)
crc32 = struct.pack("<L", self.crc32 & 0xffffffffL)
size = struct.pack("<L", self.total_size & 0xffffffffL)
crc32 = struct.pack("<L", self.crc32 & 0xffffffff)
size = struct.pack("<L", self.total_size & 0xffffffff)
footer = crc32 + size
compressed += footer
self.done = True

View File

@ -236,7 +236,7 @@ class Receiver(object):
df.open()
except exceptions.DiskFileDeleted as err:
want = err.timestamp < timestamp
except exceptions.DiskFileError, err:
except exceptions.DiskFileError as err:
want = True
else:
want = df.timestamp < timestamp