[Python-checkins] r82361 - python/branches/release26-maint/Tools/unicode/mkstringprep.py
matthias.klose
python-checkins at python.org
Tue Jun 29 12:59:31 CEST 2010
Author: matthias.klose
Date: Tue Jun 29 12:59:31 2010
New Revision: 82361
Log:
Tools/unicode/mkstringprep.py: Don't use string exceptions,
partial backport from r78982.
Modified:
python/branches/release26-maint/Tools/unicode/mkstringprep.py
Modified: python/branches/release26-maint/Tools/unicode/mkstringprep.py
==============================================================================
--- python/branches/release26-maint/Tools/unicode/mkstringprep.py (original)
+++ python/branches/release26-maint/Tools/unicode/mkstringprep.py Tue Jun 29 12:59:31 2010
@@ -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 @@
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:
More information about the Python-checkins
mailing list