projects
/
smooth-dl.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smooth-dl.py: support using a local path for the Manifest file
[smooth-dl.git]
/
smooth-dl.py
diff --git
a/smooth-dl.py
b/smooth-dl.py
index
44ef722
..
39785a4
100755
(executable)
--- a/
smooth-dl.py
+++ b/
smooth-dl.py
@@
-118,11
+118,11
@@
def get_manifest(url, dest_dir):
if not manifest_url.lower().endswith(('/manifest', '.ismc', '.csm')):
manifest_url += '/Manifest'
if not manifest_url.lower().endswith(('/manifest', '.ismc', '.csm')):
manifest_url += '/Manifest'
- if manifest_url.startswith('http://'):
+ if os.path.exists(url):
+ local_manifest_path = url
+ else:
local_manifest_path = os.path.join(dest_dir, 'Manifest')
download_file(manifest_url, local_manifest_path, "w")
local_manifest_path = os.path.join(dest_dir, 'Manifest')
download_file(manifest_url, local_manifest_path, "w")
- else:
- local_manifest_path = url
manifest = etree.parse(local_manifest_path)
manifest = etree.parse(local_manifest_path)