summaryrefslogtreecommitdiffstats
path: root/modules/codepoints.py
diff options
context:
space:
mode:
authorSean B. Palmer <http://inamidst.com/sbp/>2008-03-01 21:07:23 +0000
committerSean B. Palmer <http://inamidst.com/sbp/>2008-03-01 21:07:23 +0000
commit1078791cb60d3ce4543d579fc07b9c0c145e8d10 (patch)
treea4169992239556f33b8154cb35a676c3bd8e8620 /modules/codepoints.py
parent3d920f431789ac53596933785b5fe61463335e3b (diff)
downloadbot-1078791cb60d3ce4543d579fc07b9c0c145e8d10.tar.gz
bot-1078791cb60d3ce4543d579fc07b9c0c145e8d10.tar.bz2
bot-1078791cb60d3ce4543d579fc07b9c0c145e8d10.zip
Some sundry fixes and improvements to the modules.
Diffstat (limited to 'modules/codepoints.py')
-rwxr-xr-x[-rw-r--r--]modules/codepoints.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/codepoints.py b/modules/codepoints.py
index d966670..f2eb862 100644..100755
--- a/modules/codepoints.py
+++ b/modules/codepoints.py
@@ -12,7 +12,10 @@ from itertools import islice
def about(u, cp=None, name=None):
if cp is None: cp = ord(u)
- if name is None: name = unicodedata.name(u)
+ if name is None:
+ try: name = unicodedata.name(u)
+ except ValueError:
+ return 'U+%04X (No name found)' % cp
if not unicodedata.combining(u):
template = 'U+%04X %s (%s)'