diff options
author | Sridhar Ratnakumar <github@srid.name> | 2014-08-17 11:39:15 -0700 |
---|---|---|
committer | Sridhar Ratnakumar <github@srid.name> | 2014-08-17 11:39:15 -0700 |
commit | 9c93e5e0e96cef5837b4fc906f35b8c0bda87924 (patch) | |
tree | 568c9975fc5055a700b7271f807b509fc7909ef7 | |
parent | b1c99d3b2cf33369cd8eca495f9be39528ab7071 (diff) | |
download | appdirs-9c93e5e0e96cef5837b4fc906f35b8c0bda87924.tar.gz |
import winreg on py3
fixes #38
-rw-r--r-- | CHANGES.rst | 2 | ||||
-rw-r--r-- | appdirs.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index d9695b7..dfd1262 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ appdirs Changelog appdirs 1.4.1 (dev) ------------------- -- ... +- [issue #38] Fix _winreg import on Windows Py3 appdirs 1.4.0 ------------- @@ -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", |