I can manually reproduce the error like this:
>>> lines = ['', '']
>>> file_info = [line.split() for line in lines]
>>> file_info
[[], []]
>>> file_names = [os.path.normpath(x[-1]) for x in file_info]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
Probably something like this will workaround the issue:
=== modified file 'src/wubi/backends/win32/backend.py'
--- src/wubi/backends/win32/backend.py 2012-02-24 07:44:21 +0000
+++ src/wubi/backends/win32/backend.py 2012-05-24 07:47:59 +0000
@@ -539,7 +539,11 @@
lines = new_lines
file_info = [line.split() for line in lines]
- file_names = [os.path.normpath(x[-1]) for x in file_info]
+ try:
+ file_names = [os.path.normpath(x[-1]) for x in file_info]
+ except Exception, err:
+ log.exception(err)
+ return [] self.cache[iso_path] = file_names
return file_names
I can manually reproduce the error like this: normpath( x[-1]) for x in file_info]
>>> lines = ['', '']
>>> file_info = [line.split() for line in lines]
>>> file_info
[[], []]
>>> file_names = [os.path.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
Probably something like this will workaround the issue: backends/ win32/backend. py' backends/ win32/backend. py 2012-02-24 07:44:21 +0000 backends/ win32/backend. py 2012-05-24 07:47:59 +0000
=== modified file 'src/wubi/
--- src/wubi/
+++ src/wubi/
@@ -539,7 +539,11 @@
lines = new_lines
file_info = [line.split() for line in lines] normpath( x[-1]) for x in file_info] normpath( x[-1]) for x in file_info]
self. cache[iso_ path] = file_names
- file_names = [os.path.
+ try:
+ file_names = [os.path.
+ except Exception, err:
+ log.exception(err)
+ return []
return file_names