diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-30 01:19:48 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-30 01:19:48 (GMT) |
commit | ce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch) | |
tree | 05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/macurl2path.py | |
parent | 8b3febef2f96c35e9aad9db2ef499db040fdefae (diff) | |
download | cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.zip cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.bz2 |
Raise statement normalization in Lib/.
Diffstat (limited to 'Lib/macurl2path.py')
-rw-r--r-- | Lib/macurl2path.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/macurl2path.py b/Lib/macurl2path.py index b18f2b2..0c8b64f 100644 --- a/Lib/macurl2path.py +++ b/Lib/macurl2path.py @@ -15,12 +15,12 @@ def url2pathname(pathname): # tp = urllib.splittype(pathname)[0] if tp and tp != 'file': - raise RuntimeError, 'Cannot convert non-local URL to pathname' + raise RuntimeError('Cannot convert non-local URL to pathname') # Turn starting /// into /, an empty hostname means current host if pathname[:3] == '///': pathname = pathname[2:] elif pathname[:2] == '//': - raise RuntimeError, 'Cannot convert non-local URL to pathname' + raise RuntimeError('Cannot convert non-local URL to pathname') components = pathname.split('/') # Remove . and embedded .. i = 0 @@ -53,7 +53,7 @@ def pathname2url(pathname): """OS-specific conversion from a file system path to a relative URL of the 'file' scheme; not recommended for general use.""" if '/' in pathname: - raise RuntimeError, "Cannot convert pathname containing slashes" + raise RuntimeError("Cannot convert pathname containing slashes") components = pathname.split(':') # Remove empty first and/or last component if components[0] == '': |