don't allow negative values for autorefresh
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
a056c2777e
commit
9606cfcfc1
@ -71,6 +71,10 @@ class Account(CustomConfig.ConfigHelperMixin):
|
|||||||
self.refreshperiod = self.getconffloat('autorefresh', 0.0)
|
self.refreshperiod = self.getconffloat('autorefresh', 0.0)
|
||||||
self.dryrun = self.config.getboolean('general', 'dry-run')
|
self.dryrun = self.config.getboolean('general', 'dry-run')
|
||||||
self.quicknum = 0
|
self.quicknum = 0
|
||||||
|
if self.refreshperiod < 0:
|
||||||
|
self.ui.warn("autorefresh for %s is negative, fixing it to 0."%
|
||||||
|
name)
|
||||||
|
self.refreshperiod = 0.0
|
||||||
if self.refreshperiod == 0.0:
|
if self.refreshperiod == 0.0:
|
||||||
self.refreshperiod = None
|
self.refreshperiod = None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user