util: Strip file:// from local urls
Make sure that the function returns a path even for local files specified by file:// urls. JIRA: RHELCMP-5340 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
c27bfe0c59
commit
7fe32ae758
2 changed files with 7 additions and 0 deletions
|
|
@ -1046,6 +1046,8 @@ def as_local_file(url):
|
|||
yield local_filename
|
||||
finally:
|
||||
os.remove(local_filename)
|
||||
elif url.startswith("file://"):
|
||||
yield url[7:]
|
||||
else:
|
||||
# Not a remote url, return unchanged.
|
||||
yield url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue