def _load_profiles(self):
"""
Search for file containign list of profiles and reads it.
This is done in thread, with crazy hope that it will NOT crash GTK
in the process.
"""
p = os.path.join(os.path.expanduser(self.STEAMPATH), "userdata")
i = 0
if os.path.exists(p):
for user in os.listdir(p):
sharedconfig = os.path.join(p, user, self.PROFILE_LIST)
if os.path.isfile(sharedconfig):
self._lock.acquire()
log.debug("Loading sharedconfig from '%s'", sharedconfig)
try:
i = self._parse_profile_list(i, sharedconfig)
except Exception, e:
log.exception(e)
self._lock.release()
GLib.idle_add(self._load_finished)
评论列表
文章目录