mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-26 02:57:04 +00:00
Add check to prevent division by zero during backup status
This commit is contained in:
parent
cd39c2b53f
commit
6e04eb490f
@ -115,7 +115,7 @@ def backup_status(env):
|
|||||||
# full backup. That full backup frees up this one to be deleted. But, the backup
|
# full backup. That full backup frees up this one to be deleted. But, the backup
|
||||||
# must also be at least min_age_in_days old too.
|
# must also be at least min_age_in_days old too.
|
||||||
deleted_in = None
|
deleted_in = None
|
||||||
if incremental_count > 0 and first_full_size is not None:
|
if incremental_count > 0 and incremental_size > 0 and first_full_size is not None:
|
||||||
# How many days until the next incremental backup? First, the part of
|
# How many days until the next incremental backup? First, the part of
|
||||||
# the algorithm based on increment sizes:
|
# the algorithm based on increment sizes:
|
||||||
est_days_to_next_full = (.5 * first_full_size - incremental_size) / (incremental_size/incremental_count)
|
est_days_to_next_full = (.5 * first_full_size - incremental_size) / (incremental_size/incremental_count)
|
||||||
|
Loading…
Reference in New Issue
Block a user