From 6360655bf85d7f28a44336207b72f5bb7de78b47 Mon Sep 17 00:00:00 2001 From: Ryan Tucker Date: Tue, 25 Jan 2011 22:47:51 -0500 Subject: [PATCH] Change exception to use comma format The "except foo as e" form, used on line 350, doesn't work with older versions of Python; this change should allow it to work with Python 2.x in general. Thanks to Aaron Ciarlotta for the heads up! --- BackupPC_archiveHost_s3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BackupPC_archiveHost_s3 b/BackupPC_archiveHost_s3 index ccef681..16feeb1 100755 --- a/BackupPC_archiveHost_s3 +++ b/BackupPC_archiveHost_s3 @@ -347,7 +347,7 @@ for i in sorted(glob.glob(fileglob)): key.set_acl('private') key.close() retry_count = max_retries+1 - except (boto.exception.S3ResponseError, socket.error) as e: + except (boto.exception.S3ResponseError, socket.error), e: retry_count += 1 sleeptime = 2**retry_count err = 'Encountered exception %s, retrying in %i seconds (%i/%i)' % (e, sleeptime, retry_count, max_retries)