mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -326,9 +326,9 @@ class _OutputRedirectingPdb(pdb.Pdb):
|
|||
# [XX] Normalize with respect to os.path.pardir?
|
||||
def _module_relative_path(module, path):
|
||||
if not inspect.ismodule(module):
|
||||
raise TypeError, 'Expected a module: %r' % module
|
||||
raise TypeError('Expected a module: %r' % module)
|
||||
if path.startswith('/'):
|
||||
raise ValueError, 'Module-relative files may not have absolute paths'
|
||||
raise ValueError('Module-relative files may not have absolute paths')
|
||||
|
||||
# Find the base directory for the path.
|
||||
if hasattr(module, '__file__'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue