summaryrefslogtreecommitdiff
path: root/Lib/macurl2path.py
diff options
context:
space:
mode:
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 b18f2b2713..0c8b64f6af 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] == '':