mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #21324 from rallytime/pylint_develop
Some pylint 3 compatibility fixes for develop
This commit is contained in:
commit
5ba6437c89
@ -4,6 +4,7 @@ Initialize the engines system. This plugin system allows for
|
||||
complex services to be encapsulated within the salt plugin environment
|
||||
'''
|
||||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
import multiprocessing
|
||||
|
||||
# Import salt libs
|
||||
|
@ -2,13 +2,15 @@
|
||||
'''
|
||||
A simple test engine, not intended for real use but as an example
|
||||
'''
|
||||
# Import salt libs
|
||||
import salt.utils.event
|
||||
|
||||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
import json
|
||||
import logging
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils.event
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -20,7 +20,9 @@ Minions running systemd >= 219 will place new containers in
|
||||
already be present on any systemd host, as part of the **util-linux**
|
||||
package.
|
||||
'''
|
||||
|
||||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
import errno
|
||||
import logging
|
||||
import os
|
||||
@ -35,6 +37,7 @@ import salt.ext.six as six
|
||||
import salt.utils
|
||||
import salt.utils.systemd
|
||||
from salt.exceptions import CommandExecutionError, SaltInvocationError
|
||||
from salt.ext.six.moves import range # pylint: disable=redefined-builtin
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -19,19 +19,16 @@ import logging
|
||||
import salt.utils
|
||||
from salt.exceptions import CommandExecutionError
|
||||
from salt.ext.six import string_types
|
||||
from salt.ext.six.moves import range # pylint: disable=redefined-builtin
|
||||
|
||||
# Import third party libs
|
||||
try:
|
||||
import _winreg
|
||||
import salt.ext.six.moves.winreg # pylint: disable=redefined-builtin,no-name-in-module,import-error
|
||||
import win32security
|
||||
import ntsecuritycon
|
||||
HAS_WINDOWS_MODULES = True
|
||||
except ImportError:
|
||||
try:
|
||||
import winreg as _winreg
|
||||
HAS_WINDOWS_MODULES = True
|
||||
except ImportError:
|
||||
HAS_WINDOWS_MODULES = False
|
||||
HAS_WINDOWS_MODULES = False
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -61,10 +58,10 @@ class daclConstants(object):
|
||||
self.rights = {
|
||||
win32security.SE_REGISTRY_KEY: {
|
||||
'READ': {
|
||||
'BITS': _winreg.KEY_READ,
|
||||
'BITS': salt.ext.six.moves.winreg.KEY_READ,
|
||||
'TEXT': 'read'},
|
||||
'FULLCONTROL': {
|
||||
'BITS': _winreg.KEY_ALL_ACCESS,
|
||||
'BITS': salt.ext.six.moves.winreg.KEY_ALL_ACCESS,
|
||||
'TEXT': 'full control'}
|
||||
},
|
||||
win32security.SE_FILE_OBJECT: {
|
||||
@ -177,8 +174,8 @@ class daclConstants(object):
|
||||
}
|
||||
}
|
||||
self.reflection_mask = {
|
||||
True: _winreg.KEY_ALL_ACCESS,
|
||||
False: _winreg.KEY_ALL_ACCESS | _winreg.KEY_WOW64_64KEY,
|
||||
True: salt.ext.six.moves.winreg.KEY_ALL_ACCESS,
|
||||
False: salt.ext.six.moves.winreg.KEY_ALL_ACCESS | salt.ext.six.moves.winreg.KEY_WOW64_64KEY,
|
||||
}
|
||||
self.objectType = {
|
||||
'FILE': win32security.SE_FILE_OBJECT,
|
||||
|
@ -133,7 +133,7 @@ def ext_pillar(minion_id,
|
||||
'resource-id': minion_id})
|
||||
for tag in _tags:
|
||||
tags[tag.name] = tag.value
|
||||
except IndexError, e:
|
||||
except IndexError as e:
|
||||
log.error("Couldn't retrieve instance information: %s", e)
|
||||
return None
|
||||
|
||||
|
@ -17,6 +17,7 @@ ensure_in_syspath('../../../')
|
||||
# Import Salt Libs
|
||||
import integration
|
||||
from salt.config import cloud_providers_config
|
||||
from salt.ext.six.moves import range # pylint: disable=redefined-builtin
|
||||
|
||||
|
||||
def __random_name(size=6):
|
||||
|
Loading…
Reference in New Issue
Block a user