Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
conda
installer
Commits
701961f2
Commit
701961f2
authored
Jul 26, 2021
by
Paul McCarthy
🚵
Browse files
ENH: accept path to local manifest file
parent
3fa8bb05
Changes
1
Hide whitespace changes
Inline
Side-by-side
fslinstaller.py
View file @
701961f2
...
...
@@ -34,13 +34,9 @@ import traceback
# TODO check py2/3
try
:
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
try
:
# py2: urlopen result cannot be
...
...
@@ -1681,6 +1681,10 @@ def parse_args(argv=None):
if
not
op
.
exists
(
args
.
workdir
):
os
.
mkdir
(
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment