Skip to content

Commit

Permalink
Merge pull request #8 from asodeur/issue_7
Browse files Browse the repository at this point in the history
Fix references to `six.moves.winreg`in `homedirectory.py` (refactoring errors in move to Python3 support)
  • Loading branch information
mcfletch authored Aug 28, 2020
2 parents 9bc349a + 43b96c3 commit 0ad87cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions runsnakerun/homedirectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@

def winreg_getShellFolder(name):
"""Get a shell folder by string name from the registry"""
k = six.moves.winreg.OpenKey(
six.moves.winreg.HKEY_CURRENT_USER,
k = winreg.OpenKey(
winreg.HKEY_CURRENT_USER,
r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",
)
try:
# should check that it's valid? How?
return six.moves.winreg.QueryValueEx(k, name)[0]
return winreg.QueryValueEx(k, name)[0]
finally:
six.moves.winreg.CloseKey(k)
winreg.CloseKey(k)


def shell_getShellFolder(type):
Expand All @@ -50,7 +50,7 @@ def appdatadirectory():
This is the location where application-specific
files should be stored. On *nix systems, this will
be the ${HOME}/{RELATIVE_CONFIG} directory.
be the ${HOME}/{RELATIVE_CONFIG} directory.
On Win32 systems, it will be
the "Application Data" directory. Note that for
Win32 systems it is normal to create a sub-directory
Expand Down

0 comments on commit 0ad87cd

Please sign in to comment.