Skip to content

Commit

Permalink
import_vdf: Remove odd unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Oct 4, 2024
1 parent 03609f2 commit f349df5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scc/gui/importexport/import_vdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,20 @@ def _load_profiles(self) -> None:
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):
profilelist = os.path.join(p, user, self.PROFILE_LIST)
if os.path.isfile(profilelist):
self._lock.acquire()
log.debug("Loading profile list from '%s'", profilelist)
try:
i = self._parse_profile_list(i, profilelist, user)
self._parse_profile_list(profilelist, user)
except Exception as e:
log.exception(e)
self._lock.release()
GLib.idle_add(self._load_finished)

def _parse_profile_list(self, i, filename: str, userid: str) -> None | int:
def _parse_profile_list(self, filename: str, userid: str) -> None | int:
"""Parse localconfig.vdf and load game and profile IDs. That is later decoded into name of game and profile name.
Called from _load_profiles, in thread. Exceptions are catched and logged from there.
Expand Down

0 comments on commit f349df5

Please sign in to comment.