From e45be28be665a04aef0d0a7444ba27fde2dd2d5f Mon Sep 17 00:00:00 2001 From: Collin Winter Date: Thu, 23 Aug 2007 00:01:55 +0000 Subject: Convert raise statements in Lib/plat-{mac,os2emx}. --- Lib/plat-mac/Audio_mac.py | 2 +- Lib/plat-mac/Carbon/ControlAccessor.py | 4 +- Lib/plat-mac/Carbon/MediaDescr.py | 2 +- Lib/plat-mac/Carbon/Qt.py | 2 +- Lib/plat-mac/EasyDialogs.py | 22 ++-- Lib/plat-mac/MiniAEFrame.py | 2 +- Lib/plat-mac/aetools.py | 18 +-- Lib/plat-mac/aetypes.py | 2 +- Lib/plat-mac/applesingle.py | 16 +-- Lib/plat-mac/bgenlocations.py | 6 +- Lib/plat-mac/buildtools.py | 14 +-- Lib/plat-mac/bundlebuilder.py | 6 +- Lib/plat-mac/findertools.py | 52 ++++---- Lib/plat-mac/gensuitemodule.py | 18 +-- .../CodeWarrior/CodeWarrior_suite.py | 50 ++++---- .../CodeWarrior/Metrowerks_Shell_Suite.py | 128 +++++++++---------- .../lib-scriptpackages/CodeWarrior/Required.py | 2 +- .../CodeWarrior/Standard_Suite.py | 16 +-- .../Explorer/Microsoft_Internet_Explorer.py | 10 +- .../lib-scriptpackages/Explorer/Netscape_Suite.py | 4 +- .../lib-scriptpackages/Explorer/Required_Suite.py | 20 +-- .../lib-scriptpackages/Explorer/Standard_Suite.py | 2 +- .../lib-scriptpackages/Explorer/URL_Suite.py | 2 +- .../Explorer/Web_Browser_Suite.py | 30 ++--- .../lib-scriptpackages/Finder/Finder_Basics.py | 8 +- .../lib-scriptpackages/Finder/Finder_items.py | 24 ++-- .../lib-scriptpackages/Finder/Legacy_suite.py | 18 +-- .../lib-scriptpackages/Finder/Standard_Suite.py | 38 +++--- .../lib-scriptpackages/Netscape/Mozilla_suite.py | 46 +++---- .../lib-scriptpackages/Netscape/PowerPlant.py | 6 +- .../lib-scriptpackages/Netscape/Required_suite.py | 20 +-- .../lib-scriptpackages/Netscape/Standard_Suite.py | 14 +-- .../Netscape/Standard_URL_suite.py | 2 +- .../Netscape/WorldWideWeb_suite.py | 46 +++---- .../StdSuites/AppleScript_Suite.py | 138 ++++++++++----------- .../lib-scriptpackages/StdSuites/Standard_Suite.py | 62 ++++----- .../SystemEvents/Disk_Folder_File_Suite.py | 2 +- .../SystemEvents/Folder_Actions_Suite.py | 12 +- .../SystemEvents/Hidden_Suite.py | 4 +- .../lib-scriptpackages/SystemEvents/Power_Suite.py | 12 +- .../SystemEvents/Standard_Suite.py | 38 +++--- .../SystemEvents/System_Events_Suite.py | 4 +- .../lib-scriptpackages/Terminal/Standard_Suite.py | 38 +++--- .../lib-scriptpackages/Terminal/Terminal_Suite.py | 6 +- .../_builtinSuites/builtin_Suite.py | 24 ++-- Lib/plat-mac/macresource.py | 4 +- Lib/plat-mac/pimp.py | 2 +- Lib/plat-mac/plistlib.py | 4 +- Lib/plat-os2emx/_emx_link.py | 2 +- Lib/plat-os2emx/grp.py | 4 +- Lib/plat-os2emx/pwd.py | 4 +- 51 files changed, 506 insertions(+), 506 deletions(-) diff --git a/Lib/plat-mac/Audio_mac.py b/Lib/plat-mac/Audio_mac.py index 67fb959..0989967 100644 --- a/Lib/plat-mac/Audio_mac.py +++ b/Lib/plat-mac/Audio_mac.py @@ -48,7 +48,7 @@ class Play_Audio_mac: self._chan = Snd.SndNewChannel(5, 0, self._callback) nframes = len(data) / self._nchannels / self._sampwidth if len(data) != nframes * self._nchannels * self._sampwidth: - raise error, 'data is not a whole number of frames' + raise error('data is not a whole number of frames') while self._gc and \ self.getfilled() + nframes > \ self._qsize / self._nchannels / self._sampwidth: 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") diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py index e33b24e..2f0e3d3 100644 --- a/Lib/plat-mac/EasyDialogs.py +++ b/Lib/plat-mac/EasyDialogs.py @@ -306,7 +306,7 @@ class ProgressBar: self.w.HideWindow() self.w = None self.d = None - raise KeyboardInterrupt, ev + raise KeyboardInterrupt(ev) else: if part == 4: # inDrag self.w.DragWindow(where, screenbounds) @@ -526,7 +526,7 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo elif n == ARGV_CMDLINE_DATA: pass # Nothing to do else: - raise RuntimeError, "Unknown dialog item %d"%n + raise RuntimeError("Unknown dialog item %d"%n) for stringtoadd in stringstoadd: if '"' in stringtoadd or "'" in stringtoadd or " " in stringtoadd: @@ -550,14 +550,14 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo if item[0] == '"': while item[-1] != '"': if not tmplist: - raise RuntimeError, "Unterminated quoted argument" + raise RuntimeError("Unterminated quoted argument") item = item + ' ' + tmplist[0] del tmplist[0] item = item[1:-1] if item[0] == "'": while item[-1] != "'": if not tmplist: - raise RuntimeError, "Unterminated quoted argument" + raise RuntimeError("Unterminated quoted argument") item = item + ' ' + tmplist[0] del tmplist[0] item = item[1:-1] @@ -652,7 +652,7 @@ def AskFileForOpen( good = 1 except Nav.error as arg: if arg[0] != -128: # userCancelledErr - raise Nav.error, arg + raise Nav.error(arg) return None if not rr.validRecord or not rr.selection: return None @@ -664,7 +664,7 @@ def AskFileForOpen( return tpwanted(rr.selection_fsr[0].as_pathname()) if issubclass(tpwanted, str): return tpwanted(rr.selection_fsr[0].as_pathname(), 'utf8') - raise TypeError, "Unknown value for argument 'wanted': %s" % repr(tpwanted) + raise TypeError("Unknown value for argument 'wanted': %s" % repr(tpwanted)) def AskFileForSave( message=None, @@ -705,12 +705,12 @@ def AskFileForSave( good = 1 except Nav.error as arg: if arg[0] != -128: # userCancelledErr - raise Nav.error, arg + raise Nav.error(arg) return None if not rr.validRecord or not rr.selection: return None if issubclass(tpwanted, Carbon.File.FSRef): - raise TypeError, "Cannot pass wanted=FSRef to AskFileForSave" + raise TypeError("Cannot pass wanted=FSRef to AskFileForSave") if issubclass(tpwanted, Carbon.File.FSSpec): return tpwanted(rr.selection[0]) if issubclass(tpwanted, str): @@ -727,7 +727,7 @@ def AskFileForSave( if issubclass(tpwanted, str): return str(fullpath, 'utf8') return tpwanted(fullpath) - raise TypeError, "Unknown value for argument 'wanted': %s" % repr(tpwanted) + raise TypeError("Unknown value for argument 'wanted': %s" % repr(tpwanted)) def AskFolder( message=None, @@ -765,7 +765,7 @@ def AskFolder( good = 1 except Nav.error as arg: if arg[0] != -128: # userCancelledErr - raise Nav.error, arg + raise Nav.error(arg) return None if not rr.validRecord or not rr.selection: return None @@ -777,7 +777,7 @@ def AskFolder( return tpwanted(rr.selection_fsr[0].as_pathname()) if issubclass(tpwanted, str): return tpwanted(rr.selection_fsr[0].as_pathname(), 'utf8') - raise TypeError, "Unknown value for argument 'wanted': %s" % repr(tpwanted) + raise TypeError("Unknown value for argument 'wanted': %s" % repr(tpwanted)) def test(): diff --git a/Lib/plat-mac/MiniAEFrame.py b/Lib/plat-mac/MiniAEFrame.py index 7ae3351..8e551a5 100644 --- a/Lib/plat-mac/MiniAEFrame.py +++ b/Lib/plat-mac/MiniAEFrame.py @@ -79,7 +79,7 @@ class MiniApplication: c = chr(message & charCodeMask) if modifiers & cmdKey: if c == '.': - raise KeyboardInterrupt, "Command-period" + raise KeyboardInterrupt("Command-period") if c == 'q': if hasattr(MacOS, 'OutputSeen'): MacOS.OutputSeen() diff --git a/Lib/plat-mac/aetools.py b/Lib/plat-mac/aetools.py index 078b183..dd06e3e 100644 --- a/Lib/plat-mac/aetools.py +++ b/Lib/plat-mac/aetools.py @@ -111,7 +111,7 @@ def keysubst(arguments, keydict): del arguments[k] arguments[keydict[k]] = v elif k != '----' and k not in ok: - raise TypeError, 'Unknown keyword argument: %s'%k + raise TypeError('Unknown keyword argument: %s'%k) def enumsubst(arguments, key, edict): """Substitute a single enum keyword argument, if it occurs""" @@ -122,7 +122,7 @@ def enumsubst(arguments, key, edict): if v in edict: arguments[key] = Enum(edict[v]) elif not v in ok: - raise TypeError, 'Unknown enumerator: %s'%v + raise TypeError('Unknown enumerator: %s'%v) def decodeerror(arguments): """Create the 'best' argument for a raise MacOS.Error""" @@ -174,7 +174,7 @@ class TalkTo: self.target = AE.AECreateDesc(AppleEvents.typeApplSignature, signature) self.target_signature = signature else: - raise TypeError, "signature should be 4-char string or AEDesc" + raise TypeError("signature should be 4-char string or AEDesc") self.send_flags = AppleEvents.kAEWaitReply self.send_priority = AppleEvents.kAENormalPriority if timeout: @@ -214,7 +214,7 @@ class TalkTo: def sendevent(self, event): """Send a pre-created appleevent, await the reply and unpack it""" if not self.__ensure_WMAvailable(): - raise RuntimeError, "No window manager access, cannot send AppleEvent" + raise RuntimeError("No window manager access, cannot send AppleEvent") reply = event.AESend(self.send_flags, self.send_priority, self.send_timeout) parameters, attributes = unpackevent(reply, self._moduleName) @@ -248,7 +248,7 @@ class TalkTo: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if 'errn' in _arguments: - raise Error, decodeerror(_arguments) + raise Error(decodeerror(_arguments)) if '----' in _arguments: return _arguments['----'] @@ -278,7 +278,7 @@ class TalkTo: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise Error, decodeerror(_arguments) + raise Error(decodeerror(_arguments)) # XXXX Optionally decode result if '----' in _arguments: return _arguments['----'] @@ -295,7 +295,7 @@ class TalkTo: if name in self._propdict: cls = self._propdict[name] return cls() - raise AttributeError, name + raise AttributeError(name) # Tiny Finder class, for local use only @@ -308,14 +308,14 @@ class _miniFinder(TalkTo): _code = 'aevt' _subcode = 'odoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if 'errn' in _arguments: - raise Error, decodeerror(_arguments) + raise Error(decodeerror(_arguments)) # XXXX Optionally decode result if '----' in _arguments: return _arguments['----'] diff --git a/Lib/plat-mac/aetypes.py b/Lib/plat-mac/aetypes.py index 162b69f..b4492ed 100644 --- a/Lib/plat-mac/aetypes.py +++ b/Lib/plat-mac/aetypes.py @@ -541,7 +541,7 @@ class ComponentItem(SelectableItem): if name in self._propdict: cls = self._propdict[name] return cls(self) - raise AttributeError, name + raise AttributeError(name) class DelayedComponentItem: diff --git a/Lib/plat-mac/applesingle.py b/Lib/plat-mac/applesingle.py index d29ad23..a055497 100644 --- a/Lib/plat-mac/applesingle.py +++ b/Lib/plat-mac/applesingle.py @@ -49,30 +49,30 @@ class AppleSingle(object): try: magic, version, ig, nentry = struct.unpack(AS_HEADER_FORMAT, header) except ValueError as arg: - raise Error, "Unpack header error: %s" % (arg,) + raise Error("Unpack header error: %s" % (arg,)) if verbose: print('Magic: 0x%8.8x' % (magic,)) print('Version: 0x%8.8x' % (version,)) print('Entries: %d' % (nentry,)) if magic != AS_MAGIC: - raise Error, "Unknown AppleSingle magic number 0x%8.8x" % (magic,) + raise Error("Unknown AppleSingle magic number 0x%8.8x" % (magic,)) if version != AS_VERSION: - raise Error, "Unknown AppleSingle version number 0x%8.8x" % (version,) + raise Error("Unknown AppleSingle version number 0x%8.8x" % (version,)) if nentry <= 0: - raise Error, "AppleSingle file contains no forks" + raise Error("AppleSingle file contains no forks") headers = [fileobj.read(AS_ENTRY_LENGTH) for i in range(nentry)] self.forks = [] for hdr in headers: try: restype, offset, length = struct.unpack(AS_ENTRY_FORMAT, hdr) except ValueError as arg: - raise Error, "Unpack entry error: %s" % (arg,) + raise Error("Unpack entry error: %s" % (arg,)) if verbose: print("Fork %d, offset %d, length %d" % (restype, offset, length)) fileobj.seek(offset) data = fileobj.read(length) if len(data) != length: - raise Error, "Short read: expected %d bytes got %d" % (length, len(data)) + raise Error("Short read: expected %d bytes got %d" % (length, len(data))) self.forks.append((restype, data)) if restype == AS_DATAFORK: self.datafork = data @@ -84,12 +84,12 @@ class AppleSingle(object): data = False if resonly: if self.resourcefork is None: - raise Error, "No resource fork found" + raise Error("No resource fork found") fp = open(path, 'wb') fp.write(self.resourcefork) fp.close() elif (self.resourcefork is None and self.datafork is None): - raise Error, "No useful forks found" + raise Error("No useful forks found") else: if self.datafork is not None: fp = open(path, 'wb') diff --git a/Lib/plat-mac/bgenlocations.py b/Lib/plat-mac/bgenlocations.py index e7fa354..041a6ff 100644 --- a/Lib/plat-mac/bgenlocations.py +++ b/Lib/plat-mac/bgenlocations.py @@ -40,11 +40,11 @@ except ImportError: pass if not os.path.exists(BGENDIR): - raise Error, "Please fix bgenlocations.py, BGENDIR does not exist: %s" % BGENDIR + raise Error("Please fix bgenlocations.py, BGENDIR does not exist: %s" % BGENDIR) if not os.path.exists(INCLUDEDIR): - raise Error, "Please fix bgenlocations.py, INCLUDEDIR does not exist: %s" % INCLUDEDIR + raise Error("Please fix bgenlocations.py, INCLUDEDIR does not exist: %s" % INCLUDEDIR) if not os.path.exists(TOOLBOXDIR): - raise Error, "Please fix bgenlocations.py, TOOLBOXDIR does not exist: %s" % TOOLBOXDIR + raise Error("Please fix bgenlocations.py, TOOLBOXDIR does not exist: %s" % TOOLBOXDIR) # Sigh, due to the way these are used make sure they end with : or /. if BGENDIR[-1] != os.sep: diff --git a/Lib/plat-mac/buildtools.py b/Lib/plat-mac/buildtools.py index 5678a9f..2422612 100644 --- a/Lib/plat-mac/buildtools.py +++ b/Lib/plat-mac/buildtools.py @@ -57,7 +57,7 @@ def findtemplate(template=None): except (Carbon.File.Error, ValueError): continue else: - raise BuildError, "Template %r not found on sys.path" % (template,) + raise BuildError("Template %r not found on sys.path" % (template,)) file = file.as_pathname() return file @@ -71,7 +71,7 @@ def process(template, filename, destname, copy_codefragment=0, # check for the script name being longer than 32 chars. This may trigger a bug # on OSX that can destroy your sourcefile. if '#' in os.path.split(filename)[1]: - raise BuildError, "BuildApplet could destroy your sourcefile on OSX, please rename: %s" % filename + raise BuildError("BuildApplet could destroy your sourcefile on OSX, please rename: %s" % filename) # Read the source and compile it # (there's no point overwriting the destination if it has a syntax error) @@ -81,9 +81,9 @@ def process(template, filename, destname, copy_codefragment=0, try: code = compile(text + '\n', filename, "exec") except SyntaxError as arg: - raise BuildError, "Syntax error in script %s: %s" % (filename, arg) + raise BuildError("Syntax error in script %s: %s" % (filename, arg)) except EOFError: - raise BuildError, "End-of-file in script %s" % (filename,) + raise BuildError("End-of-file in script %s" % (filename,)) # Set the destination file name. Note that basename # does contain the whole filepath, only a .py is stripped. @@ -115,7 +115,7 @@ def process(template, filename, destname, copy_codefragment=0, def update(template, filename, output): if MacOS.runtimemodel == 'macho': - raise BuildError, "No updating yet for MachO applets" + raise BuildError("No updating yet for MachO applets") if progress: progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120) else: @@ -137,7 +137,7 @@ def process_common(template, progress, code, rsrcname, destname, is_update, return process_common_macho(template, progress, code, rsrcname, destname, is_update, raw, others, filename, destroot) if others: - raise BuildError, "Extra files only allowed for MachoPython applets" + raise BuildError("Extra files only allowed for MachoPython applets") # Create FSSpecs for the various files template_fsr, d1, d2 = Carbon.File.FSResolveAliasFile(template, 1) template = template_fsr.as_pathname() @@ -270,7 +270,7 @@ def process_common_macho(template, progress, code, rsrcname, destname, is_update raw=0, others=[], filename=None, destroot=""): # Check that we have a filename if filename is None: - raise BuildError, "Need source filename on MacOSX" + raise BuildError("Need source filename on MacOSX") # First make sure the name ends in ".app" if destname[-4:] != '.app': destname = destname + '.app' diff --git a/Lib/plat-mac/bundlebuilder.py b/Lib/plat-mac/bundlebuilder.py index f1ca5b8..4fee311 100755 --- a/Lib/plat-mac/bundlebuilder.py +++ b/Lib/plat-mac/bundlebuilder.py @@ -417,10 +417,10 @@ class AppBuilder(BundleBuilder): def setup(self): if ((self.standalone or self.semi_standalone) and self.mainprogram is None): - raise BundleBuilderError, ("must specify 'mainprogram' when " + raise BundleBuilderError("must specify 'mainprogram' when " "building a standalone application.") if self.mainprogram is None and self.executable is None: - raise BundleBuilderError, ("must specify either or both of " + raise BundleBuilderError("must specify either or both of " "'executable' and 'mainprogram'") self.execdir = pathjoin("Contents", self.platform) @@ -776,7 +776,7 @@ def makedirs(dir): def symlink(src, dst, mkdirs=0): """Copy a file or a directory.""" if not os.path.exists(src): - raise IOError, "No such file or directory: '%s'" % src + raise IOError("No such file or directory: '%s'" % src) if mkdirs: makedirs(os.path.dirname(dst)) os.symlink(os.path.abspath(src), dst) 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 @@ def _setcomment(object_alias, comment): 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 @@ def _getcomment(object_alias): 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 @@ def processes(): 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 @@ def processes(): 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 @@ def _processproperty(processname, property): 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 @@ def openwindow(object): 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 @@ def closewindow(object): 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 @@ def _setlocation(object_alias, location): 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 @@ def _getlocation(object_alias): 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 @@ def _getlabel(object_alias): 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 @@ def _setlabel(object_alias, index): 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 @@ def _setwindowview(folder_alias, view=0): 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 @@ def _getwindowview(folder_alias): 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 @@ def _setwindowsize(folder_alias, size): 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 @@ def _getwindowsize(folder_alias): 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 @@ def _setwindowposition(folder_alias, position): 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 @@ def _getwindowposition(folder_alias): 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 @@ def _geticon(object_alias): 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 @@ def _seticon(object_alias, icondata): 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 @@ def mountvolume(volume, server=None, username=None, password=None): 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 @@ def putaway(object): 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 @@ def volumelevel(level): 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 @@ def OSversion(): 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 @@ def filesharing(): 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 @@ def filesharing(): 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 @@ def emptytrash(): 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(): diff --git a/Lib/plat-mac/gensuitemodule.py b/Lib/plat-mac/gensuitemodule.py index b487f55..1864f4f 100644 --- a/Lib/plat-mac/gensuitemodule.py +++ b/Lib/plat-mac/gensuitemodule.py @@ -225,7 +225,7 @@ def getappterminology(fullname, verbose=None): """Get application terminology by sending an AppleEvent""" # First check that we actually can send AppleEvents if not MacOS.WMAvailable(): - raise RuntimeError, "Cannot send AppleEvents, no access to window manager" + raise RuntimeError("Cannot send AppleEvents, no access to window manager") # Next, a workaround for a bug in MacOS 10.2: sending events will hang unless # you have created an event loop first. import Carbon.Evt @@ -234,7 +234,7 @@ def getappterminology(fullname, verbose=None): # Now get the signature of the application, hoping it is a bundle pkginfo = os.path.join(fullname, 'Contents', 'PkgInfo') if not os.path.exists(pkginfo): - raise RuntimeError, "No PkgInfo file found" + raise RuntimeError("No PkgInfo file found") tp_cr = open(pkginfo, 'rb').read() cr = tp_cr[4:8] else: @@ -294,39 +294,39 @@ def simplify(item): def getbyte(f, *args): c = f.read(1) if not c: - raise EOFError, 'in getbyte' + str(args) + raise EOFError('in getbyte' + str(args)) return ord(c) def getword(f, *args): getalign(f) s = f.read(2) if len(s) < 2: - raise EOFError, 'in getword' + str(args) + raise EOFError('in getword' + str(args)) return (ord(s[0])<<8) | ord(s[1]) def getlong(f, *args): getalign(f) s = f.read(4) if len(s) < 4: - raise EOFError, 'in getlong' + str(args) + raise EOFError('in getlong' + str(args)) return (ord(s[0])<<24) | (ord(s[1])<<16) | (ord(s[2])<<8) | ord(s[3]) def getostype(f, *args): getalign(f) s = f.read(4) if len(s) < 4: - raise EOFError, 'in getostype' + str(args) + raise EOFError('in getostype' + str(args)) return s def getpstr(f, *args): c = f.read(1) if len(c) < 1: - raise EOFError, 'in getpstr[1]' + str(args) + raise EOFError('in getpstr[1]' + str(args)) nbytes = ord(c) if nbytes == 0: return '' s = f.read(nbytes) if len(s) < nbytes: - raise EOFError, 'in getpstr[2]' + str(args) + raise EOFError('in getpstr[2]' + str(args)) return s def getalign(f): @@ -1019,7 +1019,7 @@ class ObjectCompiler: properties[0][1] != 'c@#!')): if self.verbose: print('** Skip multiple %s of %s (code %r)' % (cname, self.namemappers[0].findcodename('class', code)[0], code), file=self.verbose) - raise RuntimeError, "About to skip non-empty class" + raise RuntimeError("About to skip non-empty class") return plist = [] elist = [] diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py index 17284d7..1106937 100644 --- a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py +++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py @@ -38,7 +38,7 @@ class CodeWarrior_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -50,14 +50,14 @@ class CodeWarrior_suite_Events: _code = 'CWIE' _subcode = 'MAKE' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -70,14 +70,14 @@ class CodeWarrior_suite_Events: _code = 'CWIE' _subcode = 'CHEK' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -90,14 +90,14 @@ class CodeWarrior_suite_Events: _code = 'CWIE' _subcode = 'COMP' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -110,14 +110,14 @@ class CodeWarrior_suite_Events: _code = 'CWIE' _subcode = 'DASM' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -135,13 +135,13 @@ class CodeWarrior_suite_Events: _subcode = 'EXPT' aetools.keysubst(_arguments, self._argmap_export) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -153,14 +153,14 @@ class CodeWarrior_suite_Events: _code = 'CWIE' _subcode = 'RMOB' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -173,14 +173,14 @@ class CodeWarrior_suite_Events: _code = 'CWIE' _subcode = 'RMFL' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -192,14 +192,14 @@ class CodeWarrior_suite_Events: _code = 'CWIE' _subcode = 'RUN ' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -212,14 +212,14 @@ class CodeWarrior_suite_Events: _code = 'CWIE' _subcode = 'TOCH' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -231,14 +231,14 @@ class CodeWarrior_suite_Events: _code = 'CWIE' _subcode = 'UP2D' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Metrowerks_Shell_Suite.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Metrowerks_Shell_Suite.py index 909cdc0..2a32e93 100644 --- a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Metrowerks_Shell_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Metrowerks_Shell_Suite.py @@ -33,7 +33,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -59,7 +59,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -71,14 +71,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'ClsP' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -104,7 +104,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -130,7 +130,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -155,7 +155,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -169,14 +169,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'GDef' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -189,14 +189,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'GDoc' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -217,13 +217,13 @@ class Metrowerks_Shell_Suite_Events: _subcode = 'Gref' aetools.keysubst(_arguments, self._argmap_Get_Preferences) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -249,7 +249,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -262,14 +262,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'GetP' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -282,14 +282,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'GSeg' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -303,14 +303,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'MbFN' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -323,14 +323,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'NsCl' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -343,14 +343,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'GoFn' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -363,14 +363,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'GoLn' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -384,14 +384,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'FInP' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -410,13 +410,13 @@ class Metrowerks_Shell_Suite_Events: _subcode = 'Make' aetools.keysubst(_arguments, self._argmap_Make_Project) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -429,14 +429,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'Brow' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -464,7 +464,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -490,7 +490,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -502,14 +502,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'RemB' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -523,14 +523,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'RemF' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -542,14 +542,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'ReFP' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -570,13 +570,13 @@ class Metrowerks_Shell_Suite_Events: _subcode = 'RunP' aetools.keysubst(_arguments, self._argmap_Run_Project) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -589,14 +589,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'SvMs' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -609,14 +609,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'STrg' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -629,14 +629,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'SDfP' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -662,7 +662,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -682,13 +682,13 @@ class Metrowerks_Shell_Suite_Events: _subcode = 'Pref' aetools.keysubst(_arguments, self._argmap_Set_Preferences) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -713,7 +713,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -738,7 +738,7 @@ class Metrowerks_Shell_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -752,14 +752,14 @@ class Metrowerks_Shell_Suite_Events: _code = 'MMPR' _subcode = 'Toch' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -778,13 +778,13 @@ class Metrowerks_Shell_Suite_Events: _subcode = 'UpdP' aetools.keysubst(_arguments, self._argmap_Update_Project) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py index b0749e8..6eef960 100644 --- a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py +++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py @@ -34,7 +34,7 @@ class Required_Events(Required_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py index ae277a2..54deabb 100644 --- a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py @@ -36,7 +36,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -62,7 +62,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -88,7 +88,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -115,13 +115,13 @@ class Standard_Suite_Events(Standard_Suite_Events): _subcode = 'crel' aetools.keysubst(_arguments, self._argmap_make) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -134,14 +134,14 @@ class Standard_Suite_Events(Standard_Suite_Events): _code = 'misc' _subcode = 'slct' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -166,7 +166,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py index bce9e76..ce8e217 100644 --- a/Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py +++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py @@ -21,14 +21,14 @@ class Microsoft_Internet_Explorer_Events: _code = 'MSIE' _subcode = 'SORC' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -41,14 +41,14 @@ class Microsoft_Internet_Explorer_Events: _code = 'misc' _subcode = 'pWND' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -74,7 +74,7 @@ class Microsoft_Internet_Explorer_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Netscape_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Netscape_Suite.py index c274e70..cee442c 100644 --- a/Lib/plat-mac/lib-scriptpackages/Explorer/Netscape_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Netscape_Suite.py @@ -20,14 +20,14 @@ class Netscape_Suite_Events: _code = 'MOSS' _subcode = 'book' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Required_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Required_Suite.py index 0a985d1..7c902fb 100644 --- a/Lib/plat-mac/lib-scriptpackages/Explorer/Required_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Required_Suite.py @@ -21,14 +21,14 @@ class Required_Suite_Events(Required_Suite_Events): _code = 'aevt' _subcode = 'odoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -41,14 +41,14 @@ class Required_Suite_Events(Required_Suite_Events): _code = 'aevt' _subcode = 'pdoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -60,14 +60,14 @@ class Required_Suite_Events(Required_Suite_Events): _code = 'aevt' _subcode = 'quit' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -79,14 +79,14 @@ class Required_Suite_Events(Required_Suite_Events): _code = 'aevt' _subcode = 'oapp' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py index 7ead98a..fa0d04e 100644 --- a/Lib/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py @@ -33,7 +33,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/URL_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/URL_Suite.py index e234546..1fef012 100644 --- a/Lib/plat-mac/lib-scriptpackages/Explorer/URL_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Explorer/URL_Suite.py @@ -32,7 +32,7 @@ class URL_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py index ff808eb..78c58c8 100644 --- a/Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py @@ -21,14 +21,14 @@ class Web_Browser_Suite_Events: _code = 'WWW!' _subcode = 'ACTV' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -41,14 +41,14 @@ class Web_Browser_Suite_Events: _code = 'WWW!' _subcode = 'CLSA' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -69,13 +69,13 @@ class Web_Browser_Suite_Events: _subcode = 'CLOS' aetools.keysubst(_arguments, self._argmap_CloseWindow) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -89,14 +89,14 @@ class Web_Browser_Suite_Events: _code = 'WWW!' _subcode = 'WNFO' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -109,14 +109,14 @@ class Web_Browser_Suite_Events: _code = 'WWW!' _subcode = 'LSTW' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -149,7 +149,7 @@ class Web_Browser_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -175,7 +175,7 @@ class Web_Browser_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -204,7 +204,7 @@ class Web_Browser_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py index 831e101..4afe48a 100644 --- a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py +++ b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py @@ -19,14 +19,14 @@ class Finder_Basics_Events: _code = 'misc' _subcode = 'copy' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -52,7 +52,7 @@ class Finder_Basics_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py index 7120ea6..a804109 100644 --- a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py +++ b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py @@ -20,14 +20,14 @@ class Finder_items_Events: _code = 'fndr' _subcode = 'ffav' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -52,7 +52,7 @@ class Finder_items_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -65,14 +65,14 @@ class Finder_items_Events: _code = 'fndr' _subcode = 'ejct' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -85,14 +85,14 @@ class Finder_items_Events: _code = 'fndr' _subcode = 'empt' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -105,14 +105,14 @@ class Finder_items_Events: _code = 'fndr' _subcode = 'fera' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -125,14 +125,14 @@ class Finder_items_Events: _code = 'misc' _subcode = 'mvis' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -159,7 +159,7 @@ class Finder_items_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py b/Lib/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py index 69da626..c2eb48a 100644 --- a/Lib/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py @@ -19,14 +19,14 @@ class Legacy_suite_Events: _code = 'fndr' _subcode = 'rest' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -38,14 +38,14 @@ class Legacy_suite_Events: _code = 'fndr' _subcode = 'shut' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -57,14 +57,14 @@ class Legacy_suite_Events: _code = 'fndr' _subcode = 'slep' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py index 830f58c..ff28486 100644 --- a/Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py @@ -21,14 +21,14 @@ class Standard_Suite_Events(Standard_Suite_Events): _code = 'core' _subcode = 'clos' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -54,7 +54,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -80,7 +80,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -94,14 +94,14 @@ class Standard_Suite_Events(Standard_Suite_Events): _code = 'core' _subcode = 'delo' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -133,7 +133,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -147,14 +147,14 @@ class Standard_Suite_Events(Standard_Suite_Events): _code = 'core' _subcode = 'doex' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -179,13 +179,13 @@ class Standard_Suite_Events(Standard_Suite_Events): _subcode = 'crel' aetools.keysubst(_arguments, self._argmap_make) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -220,7 +220,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -247,7 +247,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -272,7 +272,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -284,14 +284,14 @@ class Standard_Suite_Events(Standard_Suite_Events): _code = 'aevt' _subcode = 'quit' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -304,14 +304,14 @@ class Standard_Suite_Events(Standard_Suite_Events): _code = 'misc' _subcode = 'slct' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py index f4aea73..21a28d8 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py @@ -20,14 +20,14 @@ class Mozilla_suite_Events: _code = 'MOSS' _subcode = 'Impt' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -40,14 +40,14 @@ class Mozilla_suite_Events: _code = 'MOSS' _subcode = 'upro' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -60,14 +60,14 @@ class Mozilla_suite_Events: _code = 'MOSS' _subcode = 'wurl' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -93,7 +93,7 @@ class Mozilla_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -106,14 +106,14 @@ class Mozilla_suite_Events: _code = 'MOSS' _subcode = 'hcmd' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -125,14 +125,14 @@ class Mozilla_suite_Events: _code = 'MOSS' _subcode = 'addr' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -145,14 +145,14 @@ class Mozilla_suite_Events: _code = 'MOSS' _subcode = 'cpnt' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -164,14 +164,14 @@ class Mozilla_suite_Events: _code = 'MOSS' _subcode = 'prfl' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -184,14 +184,14 @@ class Mozilla_suite_Events: _code = 'MOSS' _subcode = 'book' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -218,7 +218,7 @@ class Mozilla_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py b/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py index 7767305..a0c84b2 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py @@ -25,13 +25,13 @@ class PowerPlant_Events: _subcode = 'sttg' aetools.keysubst(_arguments, self._argmap_SwitchTellTarget) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -56,7 +56,7 @@ class PowerPlant_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Required_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Required_suite.py index b5c4110..8767ac3 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/Required_suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Required_suite.py @@ -21,14 +21,14 @@ class Required_suite_Events(Required_Suite_Events): _code = 'aevt' _subcode = 'odoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -41,14 +41,14 @@ class Required_suite_Events(Required_Suite_Events): _code = 'aevt' _subcode = 'pdoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -60,14 +60,14 @@ class Required_suite_Events(Required_Suite_Events): _code = 'aevt' _subcode = 'quit' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -79,14 +79,14 @@ class Required_suite_Events(Required_Suite_Events): _code = 'aevt' _subcode = 'oapp' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py index 5c3e927..7bb4a5c 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py @@ -21,14 +21,14 @@ class Standard_Suite_Events(Standard_Suite_Events): _code = 'core' _subcode = 'clos' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -42,14 +42,14 @@ class Standard_Suite_Events(Standard_Suite_Events): _code = 'core' _subcode = 'dsiz' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -63,14 +63,14 @@ class Standard_Suite_Events(Standard_Suite_Events): _code = 'core' _subcode = 'getd' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -95,7 +95,7 @@ class Standard_Suite_Events(Standard_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py index de4a01c..6001118 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py @@ -38,7 +38,7 @@ class Standard_URL_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py index 06cbfa7..2bfa2a5 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py @@ -43,7 +43,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -73,7 +73,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -98,7 +98,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -112,14 +112,14 @@ class WorldWideWeb_suite_Events: _code = 'WWW!' _subcode = 'FURL' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -133,14 +133,14 @@ class WorldWideWeb_suite_Events: _code = 'WWW!' _subcode = 'WNFO' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -153,14 +153,14 @@ class WorldWideWeb_suite_Events: _code = 'WWW!' _subcode = 'LSTW' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -186,7 +186,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -199,14 +199,14 @@ class WorldWideWeb_suite_Events: _code = 'WWW!' _subcode = 'RGUE' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -232,7 +232,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -260,7 +260,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -286,7 +286,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -299,14 +299,14 @@ class WorldWideWeb_suite_Events: _code = 'WWW!' _subcode = 'UNRU' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -332,7 +332,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -358,7 +358,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -384,7 +384,7 @@ class WorldWideWeb_suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -397,14 +397,14 @@ class WorldWideWeb_suite_Events: _code = 'WWW!' _subcode = 'ACTV' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py index 773d1d7..5e710b9 100644 --- a/Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py @@ -21,14 +21,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'ccat' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -42,14 +42,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '* ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -63,14 +63,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '+ ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -84,14 +84,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '- ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -105,14 +105,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '< ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -126,14 +126,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '= ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -147,14 +147,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '> ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -234,7 +234,7 @@ class AppleScript_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -248,14 +248,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '^ ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -267,14 +267,14 @@ class AppleScript_Suite_Events: _code = 'misc' _subcode = 'actv' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -288,14 +288,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'AND ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -309,14 +309,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'coer' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -330,14 +330,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'cont' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -351,14 +351,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'div ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -370,14 +370,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'tend' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -391,14 +391,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'ends' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -429,7 +429,7 @@ class AppleScript_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -442,14 +442,14 @@ class AppleScript_Suite_Events: _code = 'misc' _subcode = 'idle' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -461,14 +461,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'noop' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -481,14 +481,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'cmnt' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -502,14 +502,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'mod ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -523,14 +523,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'neg ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -544,14 +544,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'NOT ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -565,14 +565,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'OR ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -584,14 +584,14 @@ class AppleScript_Suite_Events: _code = 'ToyS' _subcode = 'log1' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -605,14 +605,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'bgwt' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -624,14 +624,14 @@ class AppleScript_Suite_Events: _code = 'ToyS' _subcode = 'log0' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -643,14 +643,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = 'tell' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -664,14 +664,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '\xad ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -685,14 +685,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '<= ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -706,14 +706,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '>= ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -727,14 +727,14 @@ class AppleScript_Suite_Events: _code = 'ascr' _subcode = '/ ' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py index 86681f5..187ea50 100644 --- a/Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py @@ -34,7 +34,7 @@ class Standard_Suite_Events(builtin_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -62,7 +62,7 @@ class Standard_Suite_Events(builtin_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -88,7 +88,7 @@ class Standard_Suite_Events(builtin_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -114,7 +114,7 @@ class Standard_Suite_Events(builtin_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -127,14 +127,14 @@ class Standard_Suite_Events(builtin_Suite_Events): _code = 'core' _subcode = 'delo' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -162,7 +162,7 @@ class Standard_Suite_Events(builtin_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -188,7 +188,7 @@ class Standard_Suite_Events(builtin_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -202,14 +202,14 @@ class Standard_Suite_Events(builtin_Suite_Events): _code = 'core' _subcode = 'doex' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -223,14 +223,14 @@ class Standard_Suite_Events(builtin_Suite_Events): _code = 'core' _subcode = 'brak' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -255,13 +255,13 @@ class Standard_Suite_Events(builtin_Suite_Events): _subcode = 'crel' aetools.keysubst(_arguments, self._argmap_make) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -287,7 +287,7 @@ class Standard_Suite_Events(builtin_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -300,14 +300,14 @@ class Standard_Suite_Events(builtin_Suite_Events): _code = 'aevt' _subcode = 'odoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -320,14 +320,14 @@ class Standard_Suite_Events(builtin_Suite_Events): _code = 'aevt' _subcode = 'pdoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -345,14 +345,14 @@ class Standard_Suite_Events(builtin_Suite_Events): _subcode = 'quit' aetools.keysubst(_arguments, self._argmap_quit) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') aetools.enumsubst(_arguments, 'savo', _Enum_savo) _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -364,14 +364,14 @@ class Standard_Suite_Events(builtin_Suite_Events): _code = 'aevt' _subcode = 'rapp' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -383,14 +383,14 @@ class Standard_Suite_Events(builtin_Suite_Events): _code = 'aevt' _subcode = 'oapp' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -417,7 +417,7 @@ class Standard_Suite_Events(builtin_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -430,14 +430,14 @@ class Standard_Suite_Events(builtin_Suite_Events): _code = 'misc' _subcode = 'slct' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -463,7 +463,7 @@ class Standard_Suite_Events(builtin_Suite_Events): _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py index a0b199f..d1fe899 100644 --- a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py @@ -38,7 +38,7 @@ class Disk_Folder_File_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Folder_Actions_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Folder_Actions_Suite.py index cb07a14..a94734c 100644 --- a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Folder_Actions_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Folder_Actions_Suite.py @@ -38,7 +38,7 @@ class Folder_Actions_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -52,14 +52,14 @@ class Folder_Actions_Suite_Events: _code = 'faco' _subcode = 'lact' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -90,7 +90,7 @@ class Folder_Actions_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -118,7 +118,7 @@ class Folder_Actions_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -146,7 +146,7 @@ class Folder_Actions_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Hidden_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Hidden_Suite.py index e80ace1..f137bd6 100644 --- a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Hidden_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Hidden_Suite.py @@ -21,14 +21,14 @@ class Hidden_Suite_Events(Type_Names_Suite_Events): _code = 'misc' _subcode = 'dosc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Power_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Power_Suite.py index bfdf536..dfe535e 100644 --- a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Power_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Power_Suite.py @@ -20,14 +20,14 @@ class Power_Suite_Events: _code = 'fndr' _subcode = 'rest' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -40,14 +40,14 @@ class Power_Suite_Events: _code = 'fndr' _subcode = 'shut' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -60,14 +60,14 @@ class Power_Suite_Events: _code = 'fndr' _subcode = 'slep' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Standard_Suite.py index f20ef84..5778288 100644 --- a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Standard_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Standard_Suite.py @@ -35,7 +35,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -61,7 +61,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -74,14 +74,14 @@ class Standard_Suite_Events: _code = 'core' _subcode = 'delo' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -108,7 +108,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -122,14 +122,14 @@ class Standard_Suite_Events: _code = 'core' _subcode = 'doex' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -143,14 +143,14 @@ class Standard_Suite_Events: _code = 'core' _subcode = 'getd' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -175,13 +175,13 @@ class Standard_Suite_Events: _subcode = 'crel' aetools.keysubst(_arguments, self._argmap_make) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -206,7 +206,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -219,14 +219,14 @@ class Standard_Suite_Events: _code = 'aevt' _subcode = 'odoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -239,14 +239,14 @@ class Standard_Suite_Events: _code = 'aevt' _subcode = 'pdoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -272,7 +272,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -299,7 +299,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -324,7 +324,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py index cf3e213..1f6f8cd 100644 --- a/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py @@ -20,14 +20,14 @@ class System_Events_Suite_Events: _code = 'misc' _subcode = 'dosc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py index 035290f..61a27a8 100644 --- a/Lib/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py @@ -35,7 +35,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -61,7 +61,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -74,14 +74,14 @@ class Standard_Suite_Events: _code = 'core' _subcode = 'delo' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -108,7 +108,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -122,14 +122,14 @@ class Standard_Suite_Events: _code = 'core' _subcode = 'doex' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -143,14 +143,14 @@ class Standard_Suite_Events: _code = 'core' _subcode = 'getd' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -175,13 +175,13 @@ class Standard_Suite_Events: _subcode = 'crel' aetools.keysubst(_arguments, self._argmap_make) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -206,7 +206,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -219,14 +219,14 @@ class Standard_Suite_Events: _code = 'aevt' _subcode = 'odoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -239,14 +239,14 @@ class Standard_Suite_Events: _code = 'aevt' _subcode = 'pdoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -272,7 +272,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -299,7 +299,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -324,7 +324,7 @@ class Standard_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py b/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py index caa53d4..158623e 100644 --- a/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py @@ -20,14 +20,14 @@ class Terminal_Suite_Events: _code = 'GURL' _subcode = 'GURL' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -55,7 +55,7 @@ class Terminal_Suite_Events: _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/lib-scriptpackages/_builtinSuites/builtin_Suite.py b/Lib/plat-mac/lib-scriptpackages/_builtinSuites/builtin_Suite.py index 318250f..7d5abbd 100644 --- a/Lib/plat-mac/lib-scriptpackages/_builtinSuites/builtin_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/_builtinSuites/builtin_Suite.py @@ -17,14 +17,14 @@ class builtin_Suite_Events: _code = 'aevt' _subcode = 'odoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -36,14 +36,14 @@ class builtin_Suite_Events: _code = 'aevt' _subcode = 'oapp' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -55,14 +55,14 @@ class builtin_Suite_Events: _code = 'aevt' _subcode = 'rapp' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + if _arguments: raise TypeError('No optional args expected') + if _no_object != None: raise TypeError('No direct arg expected') _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -75,14 +75,14 @@ class builtin_Suite_Events: _code = 'aevt' _subcode = 'pdoc' - if _arguments: raise TypeError, 'No optional args expected' + if _arguments: raise TypeError('No optional args expected') _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] @@ -100,14 +100,14 @@ class builtin_Suite_Events: _subcode = 'quit' aetools.keysubst(_arguments, self._argmap_quit) - if _no_object != None: raise TypeError, 'No direct arg expected' + if _no_object != None: raise TypeError('No direct arg expected') aetools.enumsubst(_arguments, 'savo', _Enum_savo) _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) + raise aetools.Error(aetools.decodeerror(_arguments)) # XXXX Optionally decode result if _arguments.has_key('----'): return _arguments['----'] diff --git a/Lib/plat-mac/macresource.py b/Lib/plat-mac/macresource.py index fc8b381..14581a3 100644 --- a/Lib/plat-mac/macresource.py +++ b/Lib/plat-mac/macresource.py @@ -19,7 +19,7 @@ def need(restype, resid, filename=None, modname=None): Returns the refno of the resource file opened (or None)""" if modname is None and filename is None: - raise ArgumentError, "Either filename or modname argument (or both) must be given" + raise ArgumentError("Either filename or modname argument (or both) must be given") if type(resid) is type(1): try: @@ -60,7 +60,7 @@ def need(restype, resid, filename=None, modname=None): if os.path.exists(pathname): break else: - raise ResourceFileNotFoundError, filename + raise ResourceFileNotFoundError(filename) refno = open_pathname(pathname) diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py index 2a66d19..e52d0dc 100644 --- a/Lib/plat-mac/pimp.py +++ b/Lib/plat-mac/pimp.py @@ -185,7 +185,7 @@ class PimpUnpacker: watcher=None): self.argument = argument if renames and not self._can_rename: - raise RuntimeError, "This unpacker cannot rename files" + raise RuntimeError("This unpacker cannot rename files") self._dir = dir self._renames = renames self._watcher = watcher diff --git a/Lib/plat-mac/plistlib.py b/Lib/plat-mac/plistlib.py index f035729..ca7ac87 100644 --- a/Lib/plat-mac/plistlib.py +++ b/Lib/plat-mac/plistlib.py @@ -295,7 +295,7 @@ class _InternalDict(dict): try: value = self[attr] except KeyError: - raise AttributeError, attr + raise AttributeError(attr) from warnings import warn warn("Attribute access from plist dicts is deprecated, use d[key] " "notation instead", PendingDeprecationWarning) @@ -311,7 +311,7 @@ class _InternalDict(dict): try: del self[attr] except KeyError: - raise AttributeError, attr + raise AttributeError(attr) from warnings import warn warn("Attribute access from plist dicts is deprecated, use d[key] " "notation instead", PendingDeprecationWarning) diff --git a/Lib/plat-os2emx/_emx_link.py b/Lib/plat-os2emx/_emx_link.py index e829868..01e6b54 100644 --- a/Lib/plat-os2emx/_emx_link.py +++ b/Lib/plat-os2emx/_emx_link.py @@ -47,7 +47,7 @@ def link(source, target): s = os.open(source, os.O_RDONLY | os.O_BINARY) if os.isatty(s): - raise OSError, (errno.EXDEV, 'Cross-device link') + raise OSError(errno.EXDEV, 'Cross-device link') data = os.read(s, 1024) try: diff --git a/Lib/plat-os2emx/grp.py b/Lib/plat-os2emx/grp.py index fceb4c9..2ac3ca6 100644 --- a/Lib/plat-os2emx/grp.py +++ b/Lib/plat-os2emx/grp.py @@ -94,7 +94,7 @@ def __get_field_sep(record): if fs: return fs else: - raise KeyError, '>> group database fields not delimited <<' + raise KeyError('>> group database fields not delimited <<') # class to match the new record field name accessors. # the resulting object is intended to behave like a read-only tuple, @@ -136,7 +136,7 @@ def __read_group_file(): if group_file: group = open(group_file, 'r') else: - raise KeyError, '>> no group database <<' + raise KeyError('>> no group database <<') gidx = {} namx = {} sep = None diff --git a/Lib/plat-os2emx/pwd.py b/Lib/plat-os2emx/pwd.py index 95d766a..4924c90 100644 --- a/Lib/plat-os2emx/pwd.py +++ b/Lib/plat-os2emx/pwd.py @@ -113,7 +113,7 @@ def __get_field_sep(record): if fs: return fs else: - raise KeyError, '>> passwd database fields not delimited <<' + raise KeyError('>> passwd database fields not delimited <<') # class to match the new record field name accessors. # the resulting object is intended to behave like a read-only tuple, @@ -160,7 +160,7 @@ def __read_passwd_file(): if passwd_file: passwd = open(passwd_file, 'r') else: - raise KeyError, '>> no password database <<' + raise KeyError('>> no password database <<') uidx = {} namx = {} sep = None -- cgit v0.12