-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Traceback (most recent call last):
File "SLVersionChecker.py", line 659, in <module>
File "SLVersionChecker.py", line 655, in main
File "SLVersionChecker.py", line 138, in leap
File "SLVersionChecker.py", line 246, in leap_body
File "util.py", line 100, in wrapper
File "update_manager.py", line 406, in query_vvm
File "update_manager.py", line 304, in make_VVM_UUID_hash
IndexError: list index out of range
My understanding is wine doesn't support powershell properly, as such the version checker will crash because the returned string is empty at
viewer-manager/src/update_manager.py
Line 304 in baf845e
| muuid = [line for line in muuid.splitlines() if line][-1].rstrip() |
This occurs because
[line for line in "".splitlines() if line][-1] evaluates all lines that are equal to "" as False, thus a empty array can occur.
There is two ways to fix this, I'm not sure which way is preferred:
1.
muuid = [line for line in muuid.splitlines() if line]
if len(muuid) == 0:
muuid = None
else:
muuid = muuid[-1].rstrip()try:
muuid = [line for line in muuid.splitlines() if line][-1].rstrip()
except IndexError:
muuid = NoneMetadata
Metadata
Assignees
Labels
No labels