Commit 3606c2b2 authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Merge branch 'v2_1_14Version'

parents 4b164de1 27604c44
......@@ -578,8 +578,10 @@ def nbToDataAmount(n):
def printPercentage(portion, total):
'''converts portion/total couple to a percentage of completion'''
if total == 0:
if total == 0 or total is None:
return 'N/A'
if portion is None:
portion = 0
perc = portion*100.0/total
return "%.1f%%" % perc
Supports Markdown
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