mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Convert raise statements in Tools/.
This commit is contained in:
parent
2d7f6a079d
commit
a817e5894b
16 changed files with 29 additions and 29 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue