mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Raise statement normalization in Lib/.
This commit is contained in:
parent
8b3febef2f
commit
ce36ad8a46
80 changed files with 502 additions and 530 deletions
|
@ -59,7 +59,7 @@ for _name in _names:
|
|||
_errors.append(_mod.error)
|
||||
|
||||
if not _defaultmod:
|
||||
raise ImportError, "no dbm clone found; tried %s" % _names
|
||||
raise ImportError("no dbm clone found; tried %s" % _names)
|
||||
|
||||
error = tuple(_errors)
|
||||
|
||||
|
@ -74,10 +74,10 @@ def open(file, flag = 'r', mode = 0o666):
|
|||
# flag was used so use default type
|
||||
mod = _defaultmod
|
||||
else:
|
||||
raise error, "need 'c' or 'n' flag to open new db"
|
||||
raise error("need 'c' or 'n' flag to open new db")
|
||||
elif result == "":
|
||||
# db type cannot be determined
|
||||
raise error, "db type could not be determined"
|
||||
raise error("db type could not be determined")
|
||||
else:
|
||||
mod = __import__(result)
|
||||
return mod.open(file, flag, mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue