[cedar-backup-svn] SF.net SVN: cedar-backup:[1097] cedar-backup2/trunk/CedarBackup2/extend/ amazons
Brought to you by:
pronovic
|
From: <pro...@us...> - 2015-01-05 20:43:39
|
Revision: 1097
http://sourceforge.net/p/cedar-backup/code/1097
Author: pronovic
Date: 2015-01-05 20:43:36 +0000 (Mon, 05 Jan 2015)
Log Message:
-----------
Test amazons3 changes
Modified Paths:
--------------
cedar-backup2/trunk/CedarBackup2/extend/amazons3.py
Modified: cedar-backup2/trunk/CedarBackup2/extend/amazons3.py
===================================================================
--- cedar-backup2/trunk/CedarBackup2/extend/amazons3.py 2015-01-05 20:24:25 UTC (rev 1096)
+++ cedar-backup2/trunk/CedarBackup2/extend/amazons3.py 2015-01-05 20:43:36 UTC (rev 1097)
@@ -645,12 +645,14 @@
logger.debug("Amazon S3 size limit is: %d bytes" % limit)
contents = BackupFileList()
for stagingDir in stagingDirs:
- contents.addDir(stagingDir)
+ contents.addDirContents(stagingDir)
total = contents.totalSize()
logger.debug("Amazon S3 backup size is is: %d bytes" % total)
if total > limit:
- logger.debug("Amazon S3 size limit exceeded: %.0f bytes > %d bytes" % (total, limit))
+ logger.error("Amazon S3 size limit exceeded: %.0f bytes > %d bytes" % (total, limit))
raise ValueError("Amazon S3 size limit exceeded: %.0f bytes > %d bytes" % (total, limit))
+ else:
+ logger.info("Total size does not exceed Amazon S3 size limit, so backup can continue.")
##############################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|