abandon_stale: Allow singular form of age parameter

Change-Id: I87396d6fd223f930e46a85c7f67419c0e2b74b4f
This commit is contained in:
David Pursehouse
2015-07-06 12:12:28 +09:00
parent e766d2ca37
commit 25bebb136b

View File

@@ -101,7 +101,7 @@ def _main():
logging.error("Gerrit URL is required")
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)
if not match:
logging.error("Invalid age: %s", options.age)