jenkins-bot merged this change.
[IMPR] Pass exception more precise
- Pass ValueError only
Change-Id: I33b068c1807f5a25f7488848e3353cc61f807288
---
M pywikibot/date.py
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pywikibot/date.py b/pywikibot/date.py
index b2da643..0f0da40 100644
--- a/pywikibot/date.py
+++ b/pywikibot/date.py
@@ -60,10 +60,10 @@
for func, pred in tuplst:
try:
res = func(value)
- if pred(res):
- return res
- except Exception:
- pass
+ except ValueError:
+ continue
+ if pred(res):
+ return res
else:
# Find a predicate that gives true for this int value, and run a
# function
To view, visit change 511671. To unsubscribe, or for help writing mail filters, visit settings.