From: Aline Manera <alinefm(a)br.ibm.com>
When running isoinfo main program to probe a remote ISO file, it returned a
wrong path:
$ python kimchi/isoinfo.py
http://localhost/Fedora-Live-Desktop-x86_64-19-1.iso
[{'path':
'/home/alinefm/kimchi/src/http:/localhost/Fedora-Live-Desktop-x86_64-19-1.iso',
'version': '19', 'distro': 'fedora'}]
So verify the ISO is a local one and only use abspath() in this case.
Otherwise, use the path entried by user.
Signed-off-by: Aline Manera <alinefm(a)br.ibm.com>
---
src/kimchi/isoinfo.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/isoinfo.py b/src/kimchi/isoinfo.py
index 3d57533..121241a 100644
--- a/src/kimchi/isoinfo.py
+++ b/src/kimchi/isoinfo.py
@@ -284,8 +284,8 @@ def probe_iso(status_helper, params):
def update_result(iso, ret):
if ret != ('unknown', 'unknown'):
- iso = os.path.abspath(iso)
- updater({'path': iso, 'distro': ret[0], 'version':
ret[1]})
+ path = os.path.abspath(iso) if os.path.isfile(iso) else iso
+ updater({'path': path, 'distro': ret[0], 'version':
ret[1]})
if os.path.isdir(loc):
for root, dirs, files in os.walk(loc):
--
1.7.10.4