Commit 701961f2 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

ENH: accept path to local manifest file

parent 3fa8bb05
......@@ -34,13 +34,9 @@ import traceback
# TODO check py2/3
import urllib
import urllib.parse as urlparse
import urllib.request as urlrequest
except ImportError:
import urllib2 as urllib
import urllib2 as urlparse
import urllib2 as urlrequest
import urllib as urlrequest
try: import queue
except ImportError: import Queue as queue
......@@ -783,6 +779,10 @@ def download_file(url, destination, progress=None, blocksize=131072):
log.debug('Downloading %s ...', url)
# Path to local file
if op.exists(url):
url = 'file:' + urlrequest.pathname2url(op.abspath(url))
req = None
# py2: urlopen result cannot be
......@@ -1681,6 +1681,10 @@ def parse_args(argv=None):
if not op.exists(args.workdir):
# accept local path for manifest
if args.manifest is not None and op.exists(args.manifest):
args.manifest = op.abspath(args.manifest)
return args
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment