Commit feb0a0f9 authored by Luciano Cauzzi's avatar Luciano Cauzzi

fixed print

parent 9c3bbdc1
......@@ -7,9 +7,12 @@ logger = Logger.app_logger().get_logger()
def print_progress_percentage(current, total, desc=None):
print_progress_bar(current, total, prefix='Progress:', suffix='Completed', length=50)
percentage = int((current/total) * 100)
if percentage % 10 == 0:
logger.info(desc + ": " if desc is not None else "" + "Total percentage = " + str(percentage))
try:
percentage = int((current/total) * 100)
if percentage % 10 == 0:
logger.info(desc + ": " if desc is not None else "" + "Total percentage = " + str(int(percentage)))
except Exception as e:
logger.error("Error while printing percentage\n {}".format(e))
def print_progress_bar(iteration, total, prefix='', suffix='', decimals=1, length=100):
......
......@@ -3,7 +3,7 @@ import setuptools
setup(
name='logger_library',
version='0.1.9',
version='0.1.10',
packages=setuptools.find_packages(),
install_requires=['logzero', 'dependency_injector'],
url='http://github/innovation-that-excites/logger_library',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment