aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris <[email protected]>2021-01-30 22:24:36 +0000
committerGravatar Chris <[email protected]>2021-01-30 22:24:36 +0000
commit8130b34fe0d9c59b75294844b9f05942a4e6b5ad (patch)
treea07e13d19212784bbbe2683940f2a0687374c496
parentMerge PR #1388 - gracefully handle non-existing infractions (diff)
Protect against overflows caused by large expirations
-rw-r--r--bot/converters.py2
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.")