Skip to content
This repository has been archived by the owner on Nov 4, 2018. It is now read-only.

Commit

Permalink
* s3cmd: Avoid ZeroDivisionError on fast links.
Browse files Browse the repository at this point in the history
git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@307 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information
mludvig committed Dec 31, 2008
1 parent a1e3fd9 commit b5f1867
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
@@ -1,5 +1,6 @@
2008-12-31 Michal Ludvig <michal@logix.cz>

* s3cmd: Avoid ZeroDivisionError on fast links.
* s3cmd: Unicodised all info() output.

2008-12-30 Michal Ludvig <michal@logix.cz>
Expand Down
3 changes: 2 additions & 1 deletion s3cmd
Expand Up @@ -851,7 +851,8 @@ def cmd_sync_local2remote(src, dst):
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
Expand Down

0 comments on commit b5f1867

Please sign in to comment.