adjusted defaults, added sanity check for mindays
This commit is contained in:
parent
54604011b3
commit
cb2172f6a7
10
archivemail
10
archivemail
|
|
@ -180,7 +180,7 @@ class Options:
|
||||||
archive_name = None
|
archive_name = None
|
||||||
days_old_max = 180
|
days_old_max = 180
|
||||||
date_old_max = None
|
date_old_max = None
|
||||||
days_old_min = 360
|
days_old_min = 10950
|
||||||
date_old_min = None
|
date_old_min = None
|
||||||
delete_old_mail = False
|
delete_old_mail = False
|
||||||
dry_run = False
|
dry_run = False
|
||||||
|
|
@ -308,8 +308,12 @@ class Options:
|
||||||
check_sane_destdir(self.output_dir)
|
check_sane_destdir(self.output_dir)
|
||||||
if self.days_old_max < 0:
|
if self.days_old_max < 0:
|
||||||
user_error("--days argument must be positive")
|
user_error("--days argument must be positive")
|
||||||
if self.days_old_max >= 10000:
|
if self.days_old_max >= 100000:
|
||||||
user_error("--days argument must be less than 10000")
|
user_error("--days argument must be less than 100000")
|
||||||
|
if self.days_old_min < 0:
|
||||||
|
user_error("--mindays argument must be positive")
|
||||||
|
if self.days_old_max >= 100000:
|
||||||
|
user_error("--mindays argument must be less than 100000")
|
||||||
if self.min_size is not None and self.min_size < 1:
|
if self.min_size is not None and self.min_size < 1:
|
||||||
user_error("--size argument must be greater than zero")
|
user_error("--size argument must be greater than zero")
|
||||||
if self.quiet and self.verbose:
|
if self.quiet and self.verbose:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue