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: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c924b3d115044dc068569a2217569212166735f4;p=thirdparty%2FPython%2Fcpython.git Be more explicit about the error we are catching. Requested by: Antoine Pitrou --- diff --git a/Lib/locale.py b/Lib/locale.py index f44effe6d270..5e963d1f91b8 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)