diff options
| author | 2021-01-30 22:24:36 +0000 | |
|---|---|---|
| committer | 2021-01-30 22:24:36 +0000 | |
| commit | 8130b34fe0d9c59b75294844b9f05942a4e6b5ad (patch) | |
| tree | a07e13d19212784bbbe2683940f2a0687374c496 | |
| parent | Merge PR #1388 - gracefully handle non-existing infractions (diff) | |
Protect against overflows caused by large expirations
| -rw-r--r-- | bot/converters.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/converters.py b/bot/converters.py index d0a9731d6..0d9a519df 100644 --- a/bot/converters.py +++ b/bot/converters.py @@ -350,7 +350,7 @@ class Duration(DurationDelta): try: return now + delta - except ValueError: + except (ValueError, OverflowError): raise BadArgument(f"`{duration}` results in a datetime outside the supported range.") |