- return Bar(message=message.ljust(MESSAGE_LENGTH), fill='#', \
- suffix=suffix[bar_type])
+ suffix = {
+ 'default': '%(index)d/%(max)d',
+ 'percent': '%(percent)d%%',
+ 'b': '%(index)d/%(max)d B',
+ 'kb': '%(index)d/%(max)d KB',
+ 'mb': '%(index)d/%(max)d MB'
+ }
+
+ bar = Bar()
+ bar.message = message.ljust(MESSAGE_LENGTH)
+ bar.fill = '#'
+ bar.suffix = suffix[bar_type]
+ bar.bar_prefix = ' ['
+ bar.bar_suffix = '] '
+
+ return bar
+