appmenus select: fix listing HVM "Start" entry

Do list entries even if no exec line recognised.
This commit is contained in:
Marek Marczykowski-Górecki 2013-12-14 02:38:35 +01:00
parent e90a4841d9
commit f604f8a1dd

View File

@ -92,7 +92,9 @@ class AppmenuSelectManager:
desktop_name = line.partition('Name=%VMNAME%: ')[2].strip()
if line.startswith("Exec=qvm-run"):
desktop_command = line[line.find("'"):].strip("'\n")
if desktop_name and desktop_command:
if not desktop_command:
desktop_command = ""
if desktop_name:
available_appmenus.append( (template_file, desktop_name, desktop_command) )
desktop_template.close()