diff --git a/BackupPC_archiveHost_s3 b/BackupPC_archiveHost_s3 index d6c3abc..f3cf27d 100755 --- a/BackupPC_archiveHost_s3 +++ b/BackupPC_archiveHost_s3 @@ -48,10 +48,16 @@ class MyKey(Key): @return: MD5 Hash of the file in fp """ m = md5.new() - s = fp.fastread(self.BufferSize) + try: + s = fp.fastread(self.BufferSize) + except AttributeError: + s = fp.read(self.BufferSize) while s: m.update(s) - s = fp.fastread(self.BufferSize) + try: + s = fp.fastread(self.BufferSize) + except AttributeError: + s = fp.read(self.BufferSize) self.md5 = m.hexdigest() self.base64md5 = base64.encodestring(m.digest()) if self.base64md5[-1] == '\n':