Skip to content

Commit

Permalink
import winreg on py3
Browse files Browse the repository at this point in the history
fixes #38
  • Loading branch information
Sridhar Ratnakumar committed Aug 17, 2014
1 parent b1c99d3 commit 9c93e5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,7 @@ appdirs Changelog
appdirs 1.4.1 (dev)
-------------------

- ...
- [issue #38] Fix _winreg import on Windows Py3

appdirs 1.4.0
-------------
Expand Down
5 changes: 4 additions & 1 deletion appdirs.py
Expand Up @@ -410,7 +410,10 @@ def _get_win_folder_from_registry(csidl_name):
registry for this guarantees us the correct answer for all CSIDL_*
names.
"""
import _winreg
if PY3:
import winreg as _winreg
else:
import _winreg

shell_folder_name = {
"CSIDL_APPDATA": "AppData",
Expand Down

0 comments on commit 9c93e5e

Please sign in to comment.