diff options
| author | 2018-12-22 09:35:11 +0000 | |
|---|---|---|
| committer | 2018-12-22 09:35:11 +0000 | |
| commit | 7223e76e24dcf06d4b5f9e0c2c817eb5e7237628 (patch) | |
| tree | 74e27505bc384a550445fd24b265103c05b297b5 /modules/badges.py | |
| parent | Add !upsertbadge, to update or add a badge with a date (badges.py) (diff) | |
| signature | ||
Copypaste fail from moving logic out to turn a date to a string ('value' -> 'dt)
(badges.py)
Diffstat (limited to 'modules/badges.py')
| -rw-r--r-- | modules/badges.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/badges.py b/modules/badges.py index 52d027f0..d8bb015f 100644 --- a/modules/badges.py +++ b/modules/badges.py @@ -15,10 +15,10 @@ class Module(ModuleManager.BaseModule): return datetime.datetime.strptime(dt, DATETIME_FORMAT) def _parse_date(self, dt: str): - if value.lower() == "today": + if dt.lower() == "today": return self._now() else: - match = RE_HUMAN_FORMAT.match(value) + match = RE_HUMAN_FORMAT.match(dt) if not match: raise utils.EventError("Invalid date format, please use %s" % HUMAN_FORMAT_HELP) |
