Simone Tiraboschi has uploaded a new change for review.

Change subject: ux: fixing a glich on the progress bar for small files
......................................................................

ux: fixing a glich on the progress bar for small files

Fixing a glich on the progress bar for files that are
smaller than a chunk.

Change-Id: Ib1eccdacba0107327f518b2b561f13f13fde0c2b
Bug-Url: https://bugzilla.redhat.com/1077235
Signed-off-by: Simone Tiraboschi <stira...@redhat.com>
---
M src/__main__.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-iso-uploader 
refs/changes/73/37373/1

diff --git a/src/__main__.py b/src/__main__.py
index 32ae305..f8fc877 100644
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -825,7 +825,7 @@
             else:
                 fdst.write(buf)
             i += length
-            percent = float(i) / end_val
+            percent = min(float(i) / end_val, 1.0)
             ipercent = int(round(percent * 100))
             if not quiet and ipercent > old_ipercent:
                 old_ipercent = ipercent


-- 
To view, visit http://gerrit.ovirt.org/37373
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1eccdacba0107327f518b2b561f13f13fde0c2b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-iso-uploader
Gerrit-Branch: master
Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to