X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/0f2d00f9d7d5d28149707f66c719b28edfe51aed..9f1d9b668a5de15e370dc0cd85997f458bbb2c98:/forum/migrations/__init__.py?ds=sidebyside diff --git a/forum/migrations/__init__.py b/forum/migrations/__init__.py index 01fd2df..99b09c1 100644 --- a/forum/migrations/__init__.py +++ b/forum/migrations/__init__.py @@ -1,16 +1,16 @@ -import sys - -class ProgressBar(object): - def __init__(self, full): - self.full = full - self.count = 0 - - self.print_bar(0) - - def print_bar(self, progress): - sys.stdout.write("[%s%s] %d%%\r" % ('=' * progress, ' ' * (100 - progress), progress)) - sys.stdout.flush() - - def update(self): - self.count += 1 +import sys + +class ProgressBar(object): + def __init__(self, full): + self.full = full + self.count = 0 + + self.print_bar(0) + + def print_bar(self, progress): + sys.stdout.write("[%s%s] %d%%\r" % ('=' * progress, ' ' * (100 - progress), progress)) + sys.stdout.flush() + + def update(self): + self.count += 1 self.print_bar(int((float(self.count) / float(self.full)) * 100)) \ No newline at end of file