8000 Explict exceptions when setting locale. · matplotlib/matplotlib@29efe3b · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 29efe3b

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)
0