From: Jeroen Ruigrok van der Werven Date: Wed, 6 May 2009 13:16:36 +0000 (+0000) Subject: Be more explicit about the error we are catching. X-Git-Tag: v2.7a1~1262 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c924b3d115044dc068569a2217569212166735f4;p=python Be more explicit about the error we are catching. Requested by: Antoine Pitrou --- diff --git a/Lib/locale.py b/Lib/locale.py index f44effe6d2..5e963d1f91 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -555,7 +555,7 @@ else: oldloc = setlocale(LC_CTYPE) try: setlocale(LC_CTYPE, "") - except: + except Error: pass result = nl_langinfo(CODESET) setlocale(LC_CTYPE, oldloc)