Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[BUG #6877] fixed division by zero exception

  • Loading branch information...
commit b9b8adc3f4f38477e12e85f4de28241bcb90dc3a 1 parent 0a23923
@thron7 thron7 authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 tool/pylib/generator/code/CodeGenerator.py
View
6 tool/pylib/generator/code/CodeGenerator.py
@@ -1273,8 +1273,12 @@ def printTranslationStats(statsObj):
for locale, data in statsObj.stats.items():
if locale in skip_locales: continue
self._console.nl()
+ if data['total']:
+ percent_ut = 100*len(data['untranslated'])/data['total']
+ else:
+ percent_ut = 0
self._console.debug(
- "%s:\t untranslated entries: %3d%% (%d/%d)" % (locale, 100*len(data['untranslated'])/data['total'],
+ "%s:\t untranslated entries: %3d%% (%d/%d)" % (locale, percent_ut,
len(data['untranslated']), data['total'])
)
self._console.nl()
Please sign in to comment.
Something went wrong with that request. Please try again.