Browse Source

Merge pull request #37 from rda0/master

Fixes #36: exception when user list is empty
sisyphus
Jezer Mejía 3 years ago committed by GitHub
parent
commit
9191eadd5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/bridge/Greeter.py

6
src/bridge/Greeter.py

@ -116,8 +116,10 @@ class Greeter(BridgeObject):
logger.debug("LightDM API connected") logger.debug("LightDM API connected")
def _determine_shared_data_directory_path(self): def _determine_shared_data_directory_path(self):
user = LightDMUsers.get_users()[0] users = LightDMUsers.get_users()
user_data_dir = LightDMGreeter.ensure_shared_data_dir_sync(user.get_name()) if not users:
return
user_data_dir = LightDMGreeter.ensure_shared_data_dir_sync(users[0].get_name())
if user_data_dir is None: if user_data_dir is None:
return return
self._shared_data_directory = user_data_dir.rpartition('/')[0] self._shared_data_directory = user_data_dir.rpartition('/')[0]

Loading…
Cancel
Save