diff options
author | Mirko Rossini <isaidyep@gmail.com> | 2014-10-21 13:07:05 -0400 |
---|---|---|
committer | Mirko Rossini <isaidyep@gmail.com> | 2014-10-21 13:07:05 -0400 |
commit | 1bbe0edda4d7af4a05b3ca10c37b573142516342 (patch) | |
tree | 65bc944e9859db769c70957743a23f7c145b37ff | |
parent | 0d77f9165f69e5f46ce364439484157bb193ff11 (diff) | |
download | six-1bbe0edda4d7af4a05b3ca10c37b573142516342.tar.gz |
_winreg is added to the moves module under windows only
-rw-r--r-- | six.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -292,8 +292,12 @@ _moved_attributes = [ MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), - MovedModule("winreg", "_winreg"), ] +#Add windows specific modules if needed +if sys.platform in ('win32', 'cygwin'): + _moved_attributes += [ + MovedModule("winreg", "_winreg"), + ] for attr in _moved_attributes: setattr(_MovedItems, attr.name, attr) if isinstance(attr, MovedModule): |