summaryrefslogtreecommitdiffstats
path: root/Lib/macurl2path.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
commitce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch)
tree05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/macurl2path.py
parent8b3febef2f96c35e9aad9db2ef499db040fdefae (diff)
downloadcpython-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.py6
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] == '':