abandon_stale: Allow singular form of age parameter
Change-Id: I87396d6fd223f930e46a85c7f67419c0e2b74b4f
This commit is contained in:
@@ -101,7 +101,7 @@ def _main():
|
|||||||
logging.error("Gerrit URL is required")
|
logging.error("Gerrit URL is required")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
pattern = re.compile(r"^([\d]+)(months|years|weeks)")
|
pattern = re.compile(r"^([\d]+)(month[s]?|year[s]?|week[s]?)")
|
||||||
match = pattern.match(options.age)
|
match = pattern.match(options.age)
|
||||||
if not match:
|
if not match:
|
||||||
logging.error("Invalid age: %s", options.age)
|
logging.error("Invalid age: %s", options.age)
|
||||||
|
Reference in New Issue
Block a user