We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f080c3c + f593e6f commit e198a3dCopy full SHA for e198a3d
pyminifier/__init__.py
@@ -267,8 +267,11 @@ def pyminify(options, files):
267
print((
268
"{sourcefile} ({filesize}) reduced to {new_filesize} bytes "
269
"({percent_saved}% of original size)").format(**locals()))
270
- p_saved = round(
271
- (float(cumulative_new) / float(cumulative_size) * 100), 2)
+ if cumulative_size:
+ p_saved = round(
272
+ (float(cumulative_new) / float(cumulative_size) * 100), 2)
273
+ else:
274
+ p_saved = 0
275
print("Overall size reduction: {0}% of original size".format(p_saved))
276
else:
277
# Get the module name from the path
0 commit comments