Use ImportError for winreg import

This also satisfies pylint.
This commit is contained in:
Florian Bruhin 2018-06-13 20:15:16 +02:00
parent bcc4bd22ee
commit b67733b781

View File

@ -34,8 +34,10 @@ import tarfile
import tempfile
import collections
if os.name == 'nt':
try:
import winreg
except ImportError:
pass
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
os.pardir))