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 | 92f3fe9612c2ebf6ffdb7752dd8a26d1f6edc4b4 (patch) | |
tree | 65bc944e9859db769c70957743a23f7c145b37ff /six.py | |
parent | ebe2cd1761a7da32e3fb24fdc53b80914ab1d300 (diff) | |
download | six-git-92f3fe9612c2ebf6ffdb7752dd8a26d1f6edc4b4.tar.gz |
_winreg is added to the moves module under windows only
Diffstat (limited to 'six.py')
-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): |