aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Xithrius <[email protected]>2021-02-01 11:37:33 -0800
committerGravatar GitHub <[email protected]>2021-02-01 11:37:33 -0800
commit79bfab3c1e90aeb148fda1fddceb671ea4602db3 (patch)
tree05fbafed1e928005d2eab9cd78fb297f17b8e7fc
parentMake sure that restrictions also applies to moderators (diff)
parentMerge branch 'master' into Handle-OverflowErrors (diff)
Merge pull request #1390 from ChrisLovering/Handle-OverflowErrors
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.")