mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch 'lint_fixes' into udpate_pylintrc
This commit is contained in:
commit
c07b0a20b5
5 changed files with 5 additions and 5 deletions
|
@ -70,7 +70,7 @@ def beacon(config):
|
|||
__context__[LOC_KEY] = fp_.tell()
|
||||
pack = struct.unpack(FMT, raw)
|
||||
event = {}
|
||||
for ind in range(len(FIELDS)):
|
||||
for ind in enumerate(FIELDS):
|
||||
event[FIELDS[ind]] = pack[ind]
|
||||
if isinstance(event[FIELDS[ind]], str):
|
||||
event[FIELDS[ind]] = event[FIELDS[ind]].strip('\x00')
|
||||
|
|
|
@ -78,7 +78,7 @@ def beacon(config):
|
|||
'tag': pid}
|
||||
if 'execve' in line:
|
||||
comps = line.split('execve')[1].split('"')
|
||||
for ind in range(len(comps)):
|
||||
for ind in enumerate(comps):
|
||||
if ind == 1:
|
||||
event['cmd'] = comps[ind]
|
||||
continue
|
||||
|
|
|
@ -70,7 +70,7 @@ def beacon(config):
|
|||
__context__[LOC_KEY] = fp_.tell()
|
||||
pack = struct.unpack(FMT, raw)
|
||||
event = {}
|
||||
for ind in range(len(FIELDS)):
|
||||
for ind in enumerate(FIELDS):
|
||||
event[FIELDS[ind]] = pack[ind]
|
||||
if isinstance(event[FIELDS[ind]], str):
|
||||
event[FIELDS[ind]] = event[FIELDS[ind]].strip('\x00')
|
||||
|
|
|
@ -136,7 +136,7 @@ def main(argv): # pylint: disable=W0613
|
|||
# Salt thin now is available to use
|
||||
else:
|
||||
scpstat = subprocess.Popen(['/bin/sh', '-c', 'command -v scp']).wait()
|
||||
if not scpstat == 0:
|
||||
if scpstat != 0:
|
||||
sys.exit(EX_SCP_NOT_FOUND)
|
||||
|
||||
if not os.path.exists(OPTIONS.saltdir):
|
||||
|
|
|
@ -2754,7 +2754,7 @@ def update_lxc_conf(name, lxc_conf, lxc_conf_unset):
|
|||
({line[0]: line[1:]}, {key: item}))
|
||||
break
|
||||
if not matched:
|
||||
if not (key, item) in lines:
|
||||
if (key, item) not in lines:
|
||||
lines.append((key, item))
|
||||
changes['added'].append({key: item})
|
||||
dest_lxc_conf = []
|
||||
|
|
Loading…
Add table
Reference in a new issue