Merge remote-tracking branch 'origin/pr/205'

* origin/pr/205:
  qubes-session-autostart: handle error when reading a directory
This commit is contained in:
Marek Marczykowski-Górecki 2020-01-16 04:25:00 +01:00
commit 3adec4b952
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -60,7 +60,16 @@ def process_autostart(environments):
# handle only "most important" entry
processed_entries = {}
for path in xdg.BaseDirectory.load_config_paths('autostart'):
for entry_name in os.listdir(path):
try:
entries = os.listdir(path)
except Exception as e:
print(
"Failed to process path '{}': {}".format(path, str(e)),
file=sys.stderr
)
continue
for entry_name in entries:
if entry_name in processed_entries:
continue