Tools/unicode/mkstringprep.py: Don't use string exceptions,

partial backport from r78982.
This commit is contained in:
Matthias Klose 2010-06-29 10:59:31 +00:00
parent 1b939643d9
commit 8b8b260019
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import re, unicodedata, sys
if sys.maxunicode == 65535:
raise RuntimeError, "need UCS-4 Python"
raise RuntimeError("need UCS-4 Python")
def gen_category(cats):
for i in range(0, 0x110000):
@ -63,14 +63,14 @@ for l in data:
if m:
if m.group(1) == "Start":
if curname:
raise "Double Start",(curname, l)
raise RuntimeError("Double Start", (curname, l))
curname = m.group(2)
table = {}
tables.append((curname, table))
continue
else:
if not curname:
raise "End without start", l
raise RuntimeError("End without start", l)
curname = None
continue
if not curname: