mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1368341 - Fixup handling of file urls in mozharness, r=ahal
MozReview-Commit-ID: 7BpUFLZttsh --HG-- extra : rebase_source : c1872911812628d97d8516916c44d36558e30b52
This commit is contained in:
parent
ba40cb0a5c
commit
ab3298c9c4
@ -369,10 +369,11 @@ class ScriptMixin(PlatformMixin):
|
||||
parsed_url = urlparse.urlparse(url)
|
||||
|
||||
if parsed_url.scheme in ('', 'file'):
|
||||
if not os.path.isfile(url):
|
||||
path = parsed_url.path
|
||||
if not os.path.isfile(path):
|
||||
raise IOError('Could not find file to extract: {}'.format(url))
|
||||
|
||||
content_length = os.stat(url.replace('file://', '')).st_size
|
||||
content_length = os.stat(path).st_size
|
||||
|
||||
# In case we're referrencing a file without file://
|
||||
if parsed_url.scheme == '':
|
||||
|
Loading…
Reference in New Issue
Block a user