summaryrefslogtreecommitdiff
path: root/appdirs.py
diff options
context:
space:
mode:
authorSridhar Ratnakumar <github@srid.name>2014-08-17 11:39:15 -0700
committerSridhar Ratnakumar <github@srid.name>2014-08-17 11:39:15 -0700
commit9c93e5e0e96cef5837b4fc906f35b8c0bda87924 (patch)
tree568c9975fc5055a700b7271f807b509fc7909ef7 /appdirs.py
parentb1c99d3b2cf33369cd8eca495f9be39528ab7071 (diff)
downloadappdirs-9c93e5e0e96cef5837b4fc906f35b8c0bda87924.tar.gz
import winreg on py3
fixes #38
Diffstat (limited to 'appdirs.py')
-rw-r--r--appdirs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/appdirs.py b/appdirs.py
index f74e27a..0342a07 100644
--- a/appdirs.py
+++ b/appdirs.py
@@ -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",