Bug 703768 - Don't confuse Windows paths with URLs. r=ted

This commit is contained in:
Jesse Ruderman 2011-11-29 14:13:08 -08:00
parent 4fd45ef27a
commit 685437b892

View File

@ -138,7 +138,8 @@ log = logging.getLogger()
def isURL(thing):
"""Return True if |thing| looks like a URL."""
return urlparse(thing).scheme != ''
# We want to download URLs like http://... but not Windows paths like c:\...
return len(urlparse(thing).scheme) >= 2
def addCommonOptions(parser, defaults={}):
parser.add_option("--xre-path",
@ -284,7 +285,7 @@ def getDebuggerInfo(directory, debugger, debuggerArgs, debuggerInteractive = Fal
debuggerInfo["args"] = debuggerArgs.split()
if debuggerInteractive:
debuggerInfo["interactive"] = debuggerInteractive
return debuggerInfo