Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 29efe3b

Browse files
committed
Explict exceptions when setting locale.
1 parent eae31b1 commit 29efe3b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/tests/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ def setup():
1515

1616
try:
1717
locale.setlocale(locale.LC_ALL, str('en_US.UTF-8'))
18-
except:
18+
except locale.Error:
1919
try:
2020
locale.setlocale(locale.LC_ALL, str('English_United States.1252'))
21-
except:
21+
except locale.Error:
2222
warnings.warn(
2323
"Could not set locale to English/United States. "
2424
"Some date-related tests may fail")

0 commit comments

Comments
 (0)