mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Convert raise statements in Lib/plat-{mac,os2emx}.
This commit is contained in:
parent
cfe02a498b
commit
e45be28be6
51 changed files with 506 additions and 506 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue