Gated ctypes import, fixed some lint

This commit is contained in:
twangboy 2015-08-04 09:01:45 -06:00
parent d7670fda0a
commit c92add95b5

View File

@ -11,7 +11,6 @@ from __future__ import absolute_import
# Import python libs
import logging
from ctypes import windll
from datetime import datetime
# Import 3rd Party Libs
@ -19,6 +18,7 @@ try:
import win32net
import win32api
import pywintypes
from ctypes import windll
HAS_WIN32NET_MODS = True
except ImportError:
HAS_WIN32NET_MODS = False
@ -273,7 +273,7 @@ def get_pending_computer_name():
'''
current = get_computer_name()
pending = read_value('HKLM',
'SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName',
r'SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName',
'ComputerName')['vdata']
if pending:
return pending if pending != current else None