summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/Carbon
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-23 00:01:55 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-23 00:01:55 (GMT)
commite45be28be665a04aef0d0a7444ba27fde2dd2d5f (patch)
tree12b6261b32a5913ed104704734e7b7a15cd74e69 /Lib/plat-mac/Carbon
parentcfe02a498b107a6436003e2bf7a48aefe4e3d59f (diff)
downloadcpython-e45be28be665a04aef0d0a7444ba27fde2dd2d5f.zip
cpython-e45be28be665a04aef0d0a7444ba27fde2dd2d5f.tar.gz
cpython-e45be28be665a04aef0d0a7444ba27fde2dd2d5f.tar.bz2
Convert raise statements in Lib/plat-{mac,os2emx}.
Diffstat (limited to 'Lib/plat-mac/Carbon')
-rw-r--r--Lib/plat-mac/Carbon/ControlAccessor.py4
-rw-r--r--Lib/plat-mac/Carbon/MediaDescr.py2
-rw-r--r--Lib/plat-mac/Carbon/Qt.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/Lib/plat-mac/Carbon/ControlAccessor.py b/Lib/plat-mac/Carbon/ControlAccessor.py
index 0998925..7833b16 100644
--- a/Lib/plat-mac/Carbon/ControlAccessor.py
+++ b/Lib/plat-mac/Carbon/ControlAccessor.py
@@ -31,7 +31,7 @@ def SetControlData(control, part, selector, data):
setfunc(control, part, selector, data)
return
if not _codingdict.has_key(selector):
- raise KeyError, ('Unknown control selector', selector)
+ raise KeyError('Unknown control selector', selector)
structfmt, coder, decoder = _codingdict[selector]
if coder:
data = coder(data)
@@ -44,7 +44,7 @@ def GetControlData(control, part, selector):
setfunc, getfunc = _accessdict[selector]
return getfunc(control, part, selector, data)
if not _codingdict.has_key(selector):
- raise KeyError, ('Unknown control selector', selector)
+ raise KeyError('Unknown control selector', selector)
structfmt, coder, decoder = _codingdict[selector]
data = control.GetControlData(part, selector)
if structfmt:
diff --git a/Lib/plat-mac/Carbon/MediaDescr.py b/Lib/plat-mac/Carbon/MediaDescr.py
index 254634b..4a40062 100644
--- a/Lib/plat-mac/Carbon/MediaDescr.py
+++ b/Lib/plat-mac/Carbon/MediaDescr.py
@@ -15,7 +15,7 @@ class _MediaDescriptionCodec:
data = data[:self.size]
values = struct.unpack(self.fmt, data)
if len(values) != len(self.names):
- raise Error, ('Format length does not match number of names', descr)
+ raise Error('Format length does not match number of names', descr)
rv = {}
for i in range(len(values)):
name = self.names[i]
diff --git a/Lib/plat-mac/Carbon/Qt.py b/Lib/plat-mac/Carbon/Qt.py
index 590a92a..6b8af94 100644
--- a/Lib/plat-mac/Carbon/Qt.py
+++ b/Lib/plat-mac/Carbon/Qt.py
@@ -2,4 +2,4 @@ from _Qt import *
try:
_ = AddFilePreview
except:
- raise ImportError, "Old (2.3) _Qt.so module loaded in stead of new (2.4) _Qt.so"
+ raise ImportError("Old (2.3) _Qt.so module loaded in stead of new (2.4) _Qt.so")