Merge branch 'lint_fixes' into udpate_pylintrc

This commit is contained in:
justinta89 2016-03-11 14:10:43 -07:00
commit c07b0a20b5
5 changed files with 5 additions and 5 deletions

View file

@ -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')

View file

@ -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

View file

@ -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')

View file

@ -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):

View file

@ -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 = []