mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-01 08:48:01 +00:00
feat(parse_duration): improve the error message
This commit is contained in:
parent
875f7fa47e
commit
c09a0ebeb2
@ -73,7 +73,7 @@ def parse_duration(s):
|
||||
unit = YEAR
|
||||
s = s[:-len("YEAR")]
|
||||
else:
|
||||
raise ValueError("no unit (like day, month, or year) in '%s'" % orig)
|
||||
raise ValueError("no unit (like s, day, mo, month, or year) in '%s'" % orig)
|
||||
s = s.strip()
|
||||
return int(s) * unit
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user