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!
This commit is contained in:
Ryan Tucker 2011-01-25 22:47:51 -05:00
parent 01cc4abbf6
commit 6360655bf8

View file

@ -347,7 +347,7 @@ for i in sorted(glob.glob(fileglob)):
key.set_acl('private') key.set_acl('private')
key.close() key.close()
retry_count = max_retries+1 retry_count = max_retries+1
except (boto.exception.S3ResponseError, socket.error) as e: except (boto.exception.S3ResponseError, socket.error), e:
retry_count += 1 retry_count += 1
sleeptime = 2**retry_count sleeptime = 2**retry_count
err = 'Encountered exception %s, retrying in %i seconds (%i/%i)' % (e, sleeptime, retry_count, max_retries) err = 'Encountered exception %s, retrying in %i seconds (%i/%i)' % (e, sleeptime, retry_count, max_retries)