summaryrefslogtreecommitdiffstats
path: root/Lib/locale.py
diff options
context:
space:
mode:
authorJeroen Ruigrok van der Werven <asmodai@in-nomine.org>2009-05-06 13:16:36 (GMT)
committerJeroen Ruigrok van der Werven <asmodai@in-nomine.org>2009-05-06 13:16:36 (GMT)
commitc924b3d115044dc068569a2217569212166735f4 (patch)
treeb2bab31c3a85af133e139d9ced6b140791e9fea4 /Lib/locale.py
parent56342d578ea265e7b1d74035db06431b86b7e85b (diff)
downloadcpython-c924b3d115044dc068569a2217569212166735f4.zip
cpython-c924b3d115044dc068569a2217569212166735f4.tar.gz
cpython-c924b3d115044dc068569a2217569212166735f4.tar.bz2
Be more explicit about the error we are catching.
Requested by: Antoine Pitrou
Diffstat (limited to 'Lib/locale.py')
-rw-r--r--Lib/locale.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/locale.py b/Lib/locale.py
index f44effe..5e963d1 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)