qubes-session-autostart: do not abort the whole process on invalid file
This commit is contained in:
parent
4703e3fca7
commit
67357e051f
@ -68,14 +68,19 @@ def process_autostart(environments):
|
|||||||
# make the entry as processed, even if not actually started
|
# make the entry as processed, even if not actually started
|
||||||
processed_entries[entry_name] = True
|
processed_entries[entry_name] = True
|
||||||
|
|
||||||
entry_path = os.path.join(path, entry_name)
|
try:
|
||||||
# files in $HOME have higher priority than dropins
|
entry_path = os.path.join(path, entry_name)
|
||||||
if not path.startswith(xdg.BaseDirectory.xdg_config_home):
|
# files in $HOME have higher priority than dropins
|
||||||
entry = open_desktop_entry_and_dropins(entry_path)
|
if not path.startswith(xdg.BaseDirectory.xdg_config_home):
|
||||||
else:
|
entry = open_desktop_entry_and_dropins(entry_path)
|
||||||
entry = DesktopEntry(entry_path)
|
else:
|
||||||
if entry_should_be_started(entry, environments):
|
entry = DesktopEntry(entry_path)
|
||||||
launch(entry_path)
|
if entry_should_be_started(entry, environments):
|
||||||
|
launch(entry_path)
|
||||||
|
except Exception as e:
|
||||||
|
print >>sys.stderr, "Failed to process '{}': {}".format(
|
||||||
|
entry_name, str(e)
|
||||||
|
)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
process_autostart(sys.argv[1:])
|
process_autostart(sys.argv[1:])
|
||||||
|
Loading…
Reference in New Issue
Block a user