Browse Source

Some pylint cleaning.

4.6
Darko Poljak 5 years ago
parent
commit
f368539447
  1. 2
      cdist/banner.py
  2. 11
      cdist/config.py
  3. 2
      cdist/core/code.py
  4. 4
      cdist/emulator.py
  5. 2
      cdist/exec/local.py
  6. 2
      cdist/exec/remote.py
  7. 1
      cdist/exec/util.py
  8. 2
      cdist/message.py
  9. 1
      cdist/shell.py
  10. 4
      scripts/cdist

2
cdist/banner.py vendored

@ -20,8 +20,6 @@
#
import logging
import sys
import cdist
log = logging.getLogger(__name__)

11
cdist/config.py vendored

@ -27,7 +27,6 @@ import sys
import time
import itertools
import tempfile
import socket
import multiprocessing
from cdist.mputil import mp_pool_run, mp_sig_handler
import atexit
@ -49,14 +48,17 @@ class Config(object):
"""Cdist main class to hold arbitrary data"""
def __init__(self, local, remote, dry_run=False, jobs=None,
cleanup_cmds=[]):
cleanup_cmds=None):
self.local = local
self.remote = remote
self._open_logger()
self.dry_run = dry_run
self.jobs = jobs
self.cleanup_cmds = cleanup_cmds
if cleanup_cmds:
self.cleanup_cmds = cleanup_cmds
else:
self.cleanup_cmds = []
self.explorer = core.Explorer(self.local.target_host, self.local,
self.remote, jobs=self.jobs)
@ -111,7 +113,6 @@ class Config(object):
if not (args.hostfile or args.host):
args.hostfile = '-'
initial_manifest_tempfile = None
if args.manifest == '-':
# read initial manifest from stdin
try:
@ -623,8 +624,6 @@ class Config(object):
raise cdist.Error(("Attempting to run an already finished "
"object: %s"), cdist_object)
cdist_type = cdist_object.cdist_type
# Generate
self.log.debug("Generating code for %s" % (cdist_object.name))
cdist_object.code_local = self.code.run_gencode_local(cdist_object)

2
cdist/core/code.py vendored

@ -23,8 +23,6 @@
import os
import cdist
'''
common:

4
cdist/emulator.py vendored

@ -98,7 +98,7 @@ class Emulator(object):
self.init_object()
# locking for parallel execution
with flock.Flock(self.flock_path) as lock:
with flock.Flock(self.flock_path):
self.setup_object()
self.save_stdin()
self.record_requirements()
@ -112,7 +112,7 @@ class Emulator(object):
if '__cdist_loglevel' in self.env:
try:
level = int(self.env['__cdist_loglevel'])
except:
except ValueError:
level = logging.WARNING
else:
level = logging.WARNING

2
cdist/exec/local.py vendored

@ -21,7 +21,6 @@
#
#
import io
import os
import sys
import re
@ -348,7 +347,6 @@ class Local(object):
continue
for entry in os.listdir(current_dir):
rel_entry_path = os.path.join(sub_dir, entry)
src = os.path.abspath(os.path.join(conf_dir,
sub_dir,
entry))

2
cdist/exec/remote.py vendored

@ -20,9 +20,7 @@
#
#
import io
import os
import sys
import glob
import subprocess
import logging

1
cdist/exec/util.py vendored

@ -20,7 +20,6 @@
#
import subprocess
import sys
from tempfile import TemporaryFile
import cdist

2
cdist/message.py vendored

@ -24,8 +24,6 @@ import os
import shutil
import tempfile
import cdist
log = logging.getLogger(__name__)

1
cdist/shell.py vendored

@ -21,7 +21,6 @@
import logging
import os
import subprocess
import tempfile
# initialise cdist

4
scripts/cdist

@ -21,7 +21,6 @@
#
#
import collections
import logging
@ -34,8 +33,6 @@ def commandline():
import cdist.install
import cdist.shell
import cdist.inventory
import shutil
import os
parser = cdist.argparse.get_parsers()
args = parser['main'].parse_args(sys.argv[1:])
@ -64,6 +61,7 @@ def commandline():
cdist.argparse.check_beta(vars(args))
args.func(args)
if __name__ == "__main__":
import sys

Loading…
Cancel
Save