Closed galmiguel closed 10 years ago
Hi,
I'm using your script in my Zimbra server to make my mailboxe's backups.
The script is working fine but the message printed at the end of the backup is not correct.
For example,
Backups (51 of 51) 0% completed with size: 5198608439 (4.8 GB)
The value "0%" is not correct. In this case should be 100% because numbackedup=numbackedup=51.
The "if" condition on function "percentage" is not correct.
line 266
def percentage(part, whole): if whole or part == 0: return 0 else: return 100 * float(part)/float(whole)
The condition should be "if whole ==0 or part == 0" instead of "if whole or part == 0".
Regards.
Thanks for spotting this gunthi! I've made the suggested changes.
Hi,
I'm using your script in my Zimbra server to make my mailboxe's backups.
The script is working fine but the message printed at the end of the backup is not correct.
For example,
Backups (51 of 51) 0% completed with size: 5198608439 (4.8 GB)
The value "0%" is not correct. In this case should be 100% because numbackedup=numbackedup=51.
The "if" condition on function "percentage" is not correct.
line 266
def percentage(part, whole): if whole or part == 0: return 0 else: return 100 * float(part)/float(whole)
The condition should be "if whole ==0 or part == 0" instead of "if whole or part == 0".
Regards.