Comment 2 for bug 1003789

Revision history for this message
bcbc (bcbc) wrote : Re: wubi.exe not starting

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