pastoob: Support "no expiration"
This commit is contained in:
parent
cf5b6a95f5
commit
41c25f4611
1 changed files with 3 additions and 0 deletions
|
|
@ -121,6 +121,9 @@ class Pastoob(ReplApplication):
|
||||||
'title': self.options.title}
|
'title': self.options.title}
|
||||||
|
|
||||||
def str_to_duration(self, s):
|
def str_to_duration(self, s):
|
||||||
|
if s.strip().lower() == 'never':
|
||||||
|
return False
|
||||||
|
|
||||||
parts = re.findall(r'(\d*(?:\.\d+)?)\s*([A-z]+)', s)
|
parts = re.findall(r'(\d*(?:\.\d+)?)\s*([A-z]+)', s)
|
||||||
argsmap = {'Y|y|year|years|yr|yrs': 365.25 * 24 * 3600,
|
argsmap = {'Y|y|year|years|yr|yrs': 365.25 * 24 * 3600,
|
||||||
'M|o|month|months': 30.5 * 24 * 3600,
|
'M|o|month|months': 30.5 * 24 * 3600,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue