Use ImportError for winreg import
This also satisfies pylint.
This commit is contained in:
parent
bcc4bd22ee
commit
b67733b781
@ -34,8 +34,10 @@ import tarfile
|
|||||||
import tempfile
|
import tempfile
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
if os.name == 'nt':
|
try:
|
||||||
import winreg
|
import winreg
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
os.pardir))
|
os.pardir))
|
||||||
|
Loading…
Reference in New Issue
Block a user