diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-22 23:05:06 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-22 23:05:06 (GMT) |
commit | a817e5894b20d68263056bf9af8f1582954b1d8f (patch) | |
tree | 2409955c53ffb88f6934f277d66c4fe44011e601 /Tools/msi | |
parent | 2d7f6a079df2b4582d7ccc32a7a2a7287d0bf175 (diff) | |
download | cpython-a817e5894b20d68263056bf9af8f1582954b1d8f.zip cpython-a817e5894b20d68263056bf9af8f1582954b1d8f.tar.gz cpython-a817e5894b20d68263056bf9af8f1582954b1d8f.tar.bz2 |
Convert raise statements in Tools/.
Diffstat (limited to 'Tools/msi')
-rw-r--r-- | Tools/msi/msi.py | 2 | ||||
-rw-r--r-- | Tools/msi/msilib.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py index adf470f..a184973 100644 --- a/Tools/msi/msi.py +++ b/Tools/msi/msi.py @@ -157,7 +157,7 @@ have_mingw = build_mingw_lib(lib_file, def_file, dll_file, mingw_lib) dll_path = os.path.join(srcdir, "PCBuild", dll_file) msilib.set_arch_from_file(dll_path) if msilib.pe_type(dll_path) != msilib.pe_type("msisupport.dll"): - raise SystemError, "msisupport.dll for incorrect architecture" + raise SystemError("msisupport.dll for incorrect architecture") if testpackage: ext = 'px' diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py index 8aea216..9823e2a 100644 --- a/Tools/msi/msilib.py +++ b/Tools/msi/msilib.py @@ -254,7 +254,7 @@ def change_sequence(seq, action, seqno=_Unspecified, cond = _Unspecified): seqno = seq[i][2] seq[i] = (action, cond, seqno) return - raise ValueError, "Action not found in sequence" + raise ValueError("Action not found in sequence") def add_data(db, table, values): d = MakeInstaller() @@ -274,7 +274,7 @@ def add_data(db, table, values): elif isinstance(field, Binary): r.SetStream(i+1, field.name) else: - raise TypeError, "Unsupported type %s" % field.__class__.__name__ + raise TypeError("Unsupported type %s" % field.__class__.__name__) v.Modify(win32com.client.constants.msiViewModifyInsert, r) r.ClearData() v.Close() @@ -398,7 +398,7 @@ class CAB: sys.stdout.write(line) sys.stdout.flush() if not os.path.exists(self.name+".cab"): - raise IOError, "cabarc failed" + raise IOError("cabarc failed") add_data(db, "Media", [(1, self.index, None, "#"+self.name, None, None)]) add_stream(db, self.name, self.name+".cab") @@ -672,5 +672,5 @@ def set_arch_from_file(path): Win64 = 1 arch_ext = '.amd64' else: - raise ValueError, "Unsupported architecture" + raise ValueError("Unsupported architecture") msi_type += ";1033" |