Here's a patch against 0.9.9.91 that fixes another instance where we see
a division by zero error running s3cmd on EC2.  It makes the comparison
in line 915 do the same thing as the one in line 1053.

Thanks!

    Cheers,
    Rob

--- s3cmd.orig	2009-11-18 15:43:35.000000000 -0800
+++ s3cmd	2009-11-18 15:41:44.000000000 -0800
@@ -913,7 +913,8 @@
 		total_size += response["size"]
 
 	total_elapsed = time.time() - timestamp_start
-	speed_fmt = formatSize(total_size/total_elapsed, human_readable = True, floating_point = True)
+	total_speed = total_elapsed and total_size/total_elapsed or 0.0
+	speed_fmt = formatSize(total_speed, human_readable = True, floating_point = True)
 
 	# Only print out the result if any work has been done or 
 	# if the user asked for verbose output
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
S3tools-general mailing list
S3tools-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s3tools-general

Reply via email to