diff options
-rw-r--r-- | pykolab/cli/cmd_list_quota.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pykolab/cli/cmd_list_quota.py b/pykolab/cli/cmd_list_quota.py index fece3c3..c81725a 100644 --- a/pykolab/cli/cmd_list_quota.py +++ b/pykolab/cli/cmd_list_quota.py @@ -59,7 +59,7 @@ def execute(*args, **kw): print >> sys.stderr, _("The quota for folder %s is set to literally allow 0KB of storage.") % (quota_folder) print "%d (Used: %d, Percentage: %s)" % (quota, used, u'\u221E') else: - percentage = round((used/quota)*100, 1) + percentage = round(((float)(used)/(float)(quota)) * 100.0, 1) print "%d (Used: %d, Percentage: %d)" % (quota, used, percentage) else: print "No quota" @@ -69,9 +69,9 @@ def execute(*args, **kw): if not quota_root == None and not used == None and not quota == None: if quota == 0: print >> sys.stderr, _("The quota for folder %s is set to literally allow 0KB of storage.") % (quota_folder) - print "%d (Used: %d, Percentage: %s)" % (quota, used, u'\u221E') + print "%d (Used: %d, Percentage: %d)" % (quota, used, u'\u221E') else: - percentage = round((used/quota)*100, 1) + percentage = round(((float)(used)/(float)(quota)) * 100.0, 1) print "%d (Root: %s, Used: %d, Percentage: %d)" % (quota, quota_root, used, percentage) else: print "No quota" |