]> git.ipfire.org Git - pakfire.git/commitdiff
ui.progressbar: Rename update_increment method to increment
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 30 Nov 2016 17:38:54 +0000 (18:38 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 30 Nov 2016 17:38:54 +0000 (18:38 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/http.py
src/pakfire/hub.py
src/pakfire/ui/progressbar.py

index 0964c118f8a72c00fd31dd4dc2adc8db50a30425..3b51d29b20c081b247769385efb99ecea8d5a617 100644 (file)
@@ -227,7 +227,7 @@ class Client(object):
                                                break
 
                                        l = len(buf)
-                                       p.update_increment(l)
+                                       p.increment(l)
 
        def _get_content_length(self, response):
                s = response.getheader("Content-Length")
index 4dd26f5ffd0f914d00ce86d944028df731954c42..ca71dd254c9267d0e55bc9e15db012d25f8b5bad 100644 (file)
@@ -218,7 +218,7 @@ class FileUploader(object):
                                                        chunk_size = CHUNK_SIZE
 
                                                # Update progressbar
-                                               p.update_increment(len(chunk))
+                                               p.increment(len(chunk))
 
                        # Catch any unhandled exception here, tell the hub to delete the
                        # file and raise the original exception
index ecb241524305ee0d6dd489e03bf3e883e58d6af6..8805ed3629f8eda9367803002044d5ee67b94de2 100644 (file)
@@ -98,7 +98,7 @@ class ProgressBar(object):
                self.fd.write(self._format_line())
                self.fd.write("\r")
 
-       def update_increment(self, value):
+       def increment(self, value):
                return self.update(self.value_cur + value)
 
        def _need_update(self):