summaryrefslogtreecommitdiffstats
path: root/Tools/unicode
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-20 07:33:40 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-20 07:33:40 (GMT)
commitba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23 (patch)
tree84491ee8c5be973ab45551b7319bb71416946827 /Tools/unicode
parent492f0277933fd5714762a99ec99fd7f97d99866a (diff)
downloadcpython-ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23.zip
cpython-ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23.tar.gz
cpython-ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23.tar.bz2
Issue #16261: Converted some bare except statements to except statements
with specified exception type. Original patch by Ramchandra Apte.
Diffstat (limited to 'Tools/unicode')
-rw-r--r--Tools/unicode/gencodec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/unicode/gencodec.py b/Tools/unicode/gencodec.py
index 98b3975..4c21469 100644
--- a/Tools/unicode/gencodec.py
+++ b/Tools/unicode/gencodec.py
@@ -127,7 +127,7 @@ def hexrepr(t, precision=4):
return 'None'
try:
len(t)
- except:
+ except TypeError:
return '0x%0*X' % (precision, t)
try:
return '(' + ', '.join(['0x%0*X' % (precision, item)