diff --git a/pyminifier/__init__.py b/pyminifier/__init__.py index 0e61063..e66b96a 100644 --- a/pyminifier/__init__.py +++ b/pyminifier/__init__.py @@ -267,8 +267,11 @@ def pyminify(options, files): print(( "{sourcefile} ({filesize}) reduced to {new_filesize} bytes " "({percent_saved}% of original size)").format(**locals())) - p_saved = round( - (float(cumulative_new) / float(cumulative_size) * 100), 2) + if cumulative_size: + p_saved = round( + (float(cumulative_new) / float(cumulative_size) * 100), 2) + else: + p_saved = 0 print("Overall size reduction: {0}% of original size".format(p_saved)) else: # Get the module name from the path