Skip to content

Commit

Permalink
Merge pull request #2436 from mdboom/locale-explicit-exception
Browse files Browse the repository at this point in the history
Catch explicit exceptions when setting locale.
  • Loading branch information
pelson committed Sep 18, 2013
2 parents 4daa8ca + 29efe3b commit 3e61c81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/__init__.py
Expand Up @@ -15,10 +15,10 @@ def setup():

try:
locale.setlocale(locale.LC_ALL, str('en_US.UTF-8'))
except:
except locale.Error:
try:
locale.setlocale(locale.LC_ALL, str('English_United States.1252'))
except:
except locale.Error:
warnings.warn(
"Could not set locale to English/United States. "
"Some date-related tests may fail")
Expand Down

0 comments on commit 3e61c81

Please sign in to comment.