mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Gated ctypes import, fixed some lint
This commit is contained in:
parent
d7670fda0a
commit
c92add95b5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user