Convert raise statements in Lib/plat-{mac,os2emx}.
diff --git a/Lib/plat-mac/findertools.py b/Lib/plat-mac/findertools.py
index 036c5c5..aef016e 100644
--- a/Lib/plat-mac/findertools.py
+++ b/Lib/plat-mac/findertools.py
@@ -140,7 +140,7 @@
args["data"] = comment
_reply, args, attrs = finder.send("core", "setd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -153,7 +153,7 @@
args['----'] = aeobj_01
_reply, args, attrs = finder.send("core", "getd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -175,7 +175,7 @@
args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prcs'), form="indx", seld=aetypes.Unknown('abso', "all "), fr=None)
_reply, args, attrs = finder.send('core', 'getd', args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
p = []
if '----' in args:
p = args['----']
@@ -194,7 +194,7 @@
args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('fcrt'), fr=aeobj_0)
_reply, args, attrs = finder.send('core', 'getd', args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(_arg)
+ raise Error(aetools.decodeerror(_arg))
if '----' in args:
p = args['----']
creators = p[:]
@@ -249,7 +249,7 @@
args['----'] = aeobj_01
_reply, args, attrs = finder.send("core", "getd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -270,7 +270,7 @@
args['----'] = aeobj_0
_reply, args, attrs = finder.send(_code, _subcode, args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
def closewindow(object):
"""Close a Finder window for folder, Specify by path."""
@@ -285,7 +285,7 @@
args['----'] = aeobj_0
_reply, args, attrs = finder.send(_code, _subcode, args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
def location(object, pos=None):
"""Set the position of a Finder window for folder to pos=(w, h). Specify file by name or fsspec.
@@ -308,7 +308,7 @@
args["data"] = [x, y]
_reply, args, attrs = finder.send("core", "setd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
return (x,y)
def _getlocation(object_alias):
@@ -321,7 +321,7 @@
args['----'] = aeobj_01
_reply, args, attrs = finder.send("core", "getd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
pos = args['----']
return pos.h, pos.v
@@ -346,7 +346,7 @@
args['----'] = aeobj_01
_reply, args, attrs = finder.send("core", "getd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -365,7 +365,7 @@
args["data"] = index
_reply, args, attrs = finder.send(_code, _subcode, args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
return index
def windowview(folder, view=None):
@@ -405,7 +405,7 @@
args['data'] = aeobj_3
_reply, args, attrs = finder.send(_code, _subcode, args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -422,7 +422,7 @@
args['----'] = aeobj_02
_reply, args, attrs = finder.send("core", "getd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
views = {'iimg':0, 'pnam':1, 'lgbu':2}
if '----' in args:
return views[args['----'].enum]
@@ -458,7 +458,7 @@
args["data"] = aevar00
_reply, args, attrs = finder.send(_code, _subcode, args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
return (w, h)
def _getwindowsize(folder_alias):
@@ -475,7 +475,7 @@
args['----'] = aeobj_2
_reply, args, attrs = finder.send('core', 'getd', args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -507,7 +507,7 @@
args["data"] = [x, y]
_reply, args, attrs = finder.send('core', 'setd', args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -525,7 +525,7 @@
args['----'] = aeobj_2
_reply, args, attrs = finder.send('core', 'getd', args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -552,7 +552,7 @@
args['----'] = aeobj_01
_reply, args, attrs = finder.send("core", "getd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -569,7 +569,7 @@
args["data"] = icondata
_reply, args, attrs = finder.send("core", "setd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----'].data
@@ -594,7 +594,7 @@
args['----'] = volume
_reply, args, attrs = finder.send("aevt", "mvol", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -610,7 +610,7 @@
args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('cdis'), form="name", seld=object, fr=None)
_reply, args, attrs = talker.send("fndr", "ptwy", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -631,7 +631,7 @@
args['----'] = level
_reply, args, attrs = finder.send("aevt", "stvl", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -644,7 +644,7 @@
args['----'] = aeobj_00
_reply, args, attrs = finder.send("core", "getd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
return args['----']
@@ -661,7 +661,7 @@
args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('fshr'), fr=None)
_reply, args, attrs = finder.send("core", "getd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
if args['----'] == 0:
status = -1
@@ -673,7 +673,7 @@
args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('fsup'), fr=None)
_reply, args, attrs = finder.send("core", "getd", args, attrs)
if 'errn' in args:
- raise Error, aetools.decodeerror(args)
+ raise Error(aetools.decodeerror(args))
if '----' in args:
if args['----'] == 1:
status = 0
@@ -693,7 +693,7 @@
args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('trsh'), fr=None)
_reply, args, attrs = finder.send("fndr", "empt", args, attrs)
if 'errn' in args:
- raise aetools.Error, aetools.decodeerror(args)
+ raise aetools.Error(aetools.decodeerror(args))
def _test():