ArielGlenn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/233476

Change subject: bit more pylint
......................................................................

bit more pylint

Change-Id: I231df12881a08c75fe80408b155cfd5a47929955
---
M clouseau/clouseau/retention/local/localexaminer.py
M clouseau/clouseau/retention/local/localfileaudit.py
M clouseau/clouseau/retention/local/localhomeaudit.py
M clouseau/clouseau/retention/local/locallogaudit.py
M clouseau/clouseau/retention/local/localusercfgrabber.py
M clouseau/clouseau/retention/remote/cli.py
M clouseau/clouseau/retention/remote/remotefileauditor.py
M clouseau/clouseau/retention/remote/remotelogauditor.py
M clouseau/clouseau/retention/utils/config.py
M clouseau/clouseau/retention/utils/fileinfo.py
M clouseau/clouseau/retention/utils/ignores.py
M clouseau/clouseau/retention/utils/ruleutils.py
M clouseau/clouseau/retention/utils/runner.py
M clouseau/scripts/retention/data_auditor.py
14 files changed, 108 insertions(+), 62 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/76/233476/1

diff --git a/clouseau/clouseau/retention/local/localexaminer.py 
b/clouseau/clouseau/retention/local/localexaminer.py
index 29ef86f..ccc1885 100644
--- a/clouseau/clouseau/retention/local/localexaminer.py
+++ b/clouseau/clouseau/retention/local/localexaminer.py
@@ -135,7 +135,8 @@
         except:
             print json_text
             return json_text
-        output = 
clouseau.retention.utils.fileinfo.format_pretty_output_from_dict(item, 
path_justify=50)
+        output = 
clouseau.retention.utils.fileinfo.format_pretty_output_from_dict(
+            item, path_justify=50)
         print output
         return output
 
diff --git a/clouseau/clouseau/retention/local/localfileaudit.py 
b/clouseau/clouseau/retention/local/localfileaudit.py
index 0c00763..b72e086 100644
--- a/clouseau/clouseau/retention/local/localfileaudit.py
+++ b/clouseau/clouseau/retention/local/localfileaudit.py
@@ -275,7 +275,7 @@
             if self.dirs_to_check is not None:
                 paths[:] = [p for p in paths
                             if 
clouseau.retention.utils.fileutils.dirtree_check(os.path.join(base, p),
-                                                                          
self.dirs_to_check)]
+                                                                               
 self.dirs_to_check)]
             paths[:] = [p for p in paths if
                         (not 
clouseau.retention.utils.fileutils.startswithpath(os.path.join(
                             base, p), expanded_dirs) and
@@ -313,7 +313,7 @@
     def warn_dirsize(self, path):
         fields = path.split(os.path.sep)
         self.warnings.append("WARNING: directory %s has more than %d files"
-               % (os.path.sep.join(fields[:self.depth + 1]), self.max_files))
+                             % (os.path.sep.join(fields[:self.depth + 1]), 
self.max_files))
 
     def do_local_audit(self):
         open_files = clouseau.retention.utils.fileutils.get_open_files()
diff --git a/clouseau/clouseau/retention/local/localhomeaudit.py 
b/clouseau/clouseau/retention/local/localhomeaudit.py
index c1b794a..a1f68b2 100644
--- a/clouseau/clouseau/retention/local/localhomeaudit.py
+++ b/clouseau/clouseau/retention/local/localhomeaudit.py
@@ -23,6 +23,7 @@
                                                 maxfiles)
 
         # pick up user-created local configs of files/dirs in their homedirs 
to ignore
-        local_ignore_info = 
clouseau.retention.utils.ignores.get_local_ignores(self.confdir, self.locations)
+        local_ignore_info = clouseau.retention.utils.ignores.get_local_ignores(
+            self.confdir, self.locations)
         local_ignores = 
clouseau.retention.utils.ignores.process_local_ignores(local_ignore_info)
         self.ignored = self.ignores.merge([self.ignored, local_ignores])
diff --git a/clouseau/clouseau/retention/local/locallogaudit.py 
b/clouseau/clouseau/retention/local/locallogaudit.py
index c6487eb..e14181d 100644
--- a/clouseau/clouseau/retention/local/locallogaudit.py
+++ b/clouseau/clouseau/retention/local/locallogaudit.py
@@ -328,8 +328,9 @@
 
         for fname in all_files_sorted:
             fage = all_files[fname].get_age()
-            if 
clouseau.retention.utils.fileutils.contains(all_files[fname].filetype,
-                                                     
clouseau.retention.utils.config.conf['ignored_types']):
+            if clouseau.retention.utils.fileutils.contains(
+                    all_files[fname].filetype,
+                    clouseau.retention.utils.config.conf['ignored_types']):
                 continue
 
             if (self.oldest_only and
diff --git a/clouseau/clouseau/retention/local/localusercfgrabber.py 
b/clouseau/clouseau/retention/local/localusercfgrabber.py
index 594b5da..f91a79e 100644
--- a/clouseau/clouseau/retention/local/localusercfgrabber.py
+++ b/clouseau/clouseau/retention/local/localusercfgrabber.py
@@ -22,7 +22,8 @@
 
         local_ignores = {}
 
-        local_ignores = 
clouseau.retention.utils.ignores.get_local_ignores(self.confdir, self.locations)
+        local_ignores = clouseau.retention.utils.ignores.get_local_ignores(
+            self.confdir, self.locations)
         output = json.dumps(local_ignores)
         if not quiet:
             print output
diff --git a/clouseau/clouseau/retention/remote/cli.py 
b/clouseau/clouseau/retention/remote/cli.py
index 96bd3a0..5562999 100644
--- a/clouseau/clouseau/retention/remote/cli.py
+++ b/clouseau/clouseau/retention/remote/cli.py
@@ -6,7 +6,7 @@
 
 from clouseau.retention.utils.status import Status
 from clouseau.retention.utils.rule import RuleStore
-import clouseau.retention.remote.remotefileauditor
+from clouseau.retention.remote.remotefileauditor import get_dirs_toexamine
 from clouseau.retention.local.locallogaudit import LocalLogsAuditor
 import clouseau.retention.utils.fileinfo
 from clouseau.retention.utils.utils import JsonHelper
@@ -186,7 +186,8 @@
     # todo: down and up should check you really are (descending,
     # ascending path)
 
-    def __init__(self, confdir, store_filepath, timeout, audit_type, 
ignore_also=None, hosts_expr=None):
+    def __init__(self, confdir, store_filepath, timeout, audit_type,
+                 ignore_also=None, hosts_expr=None):
         self.confdir = confdir
 
         self.cdb = RuleStore(store_filepath)
@@ -222,7 +223,8 @@
         self.local_ignored = None
         self.ignores = Ignores(self.confdir)
         self.ignored_from_rulestore = {}
-        self.ignored_also = 
clouseau.retention.utils.ignores.convert_ignore_also_to_ignores(ignore_also)
+        self.ignored_also = 
clouseau.retention.utils.ignores.convert_ignore_also_to_ignores(
+            ignore_also)
 
         self.dircontents = CurrentDirContents(self.timeout)
         self.cenv = CurrentEnv()
@@ -238,7 +240,7 @@
             dirs_problem = None
             dirs_skipped = None
         else:
-            dirs_problem, dirs_skipped = 
clouseau.retention.remote.remotefileauditor.get_dirs_toexamine(report[host])
+            dirs_problem, dirs_skipped = get_dirs_toexamine(report[host])
         self.cenv.set_reported_dirs(dirs_problem, dirs_skipped)
         if self.cenv.problem_dirs is None and self.cenv.skipped_dirs is None:
             print "No report available from this host"
@@ -279,11 +281,14 @@
                 print "exiting at user request"
                 break
             else:
-                usercfgrab = RemoteUserCfGrabber(host_todo, self.timeout, 
self.audit_type, self.confdir)
+                usercfgrab = RemoteUserCfGrabber(host_todo, self.timeout,
+                                                 self.audit_type, self.confdir)
                 to_convert = usercfgrab.run(True)
-                self.local_ignored = 
clouseau.retention.utils.ignores.process_local_ignores(to_convert)
+                self.local_ignored = 
clouseau.retention.utils.ignores.process_local_ignores(
+                    to_convert)
 
-                results = 
clouseau.retention.utils.ignores.get_ignored_from_rulestore(self.cdb, 
[host_todo])
+                results = 
clouseau.retention.utils.ignores.get_ignored_from_rulestore(
+                    self.cdb, [host_todo])
                 if host_todo in results:
                     self.ignored_from_rulestore[host_todo] = results[host_todo]
 
@@ -327,7 +332,8 @@
             command = self.get_menu_entry(['S', 'E', 'I', 'F', 'R', 'Q'], 'S', 
text)
         elif level == 'status':
             text = Status.get_statuses_prompt(", ") + ", Q(quit status menu)"
-            command = self.get_menu_entry(Status.STATUSES + ['Q'], text, 
Status.text_to_status('good'))
+            command = self.get_menu_entry(Status.STATUSES + ['Q'], text,
+                                          Status.text_to_status('good'))
             if command == 'Q' or command == 'q':
                 level = 'top'
         elif level == 'examine':
@@ -456,7 +462,8 @@
                 print 'Not a dir or regular file, no need to mark, skipping'
                 continue
             status = Status.text_to_status('good')
-            clouseau.retention.utils.ruleutils.do_add_rule(self.cdb, 
file_expr, filetype, status, self.cenv.host)
+            clouseau.retention.utils.ruleutils.do_add_rule(
+                self.cdb, file_expr, filetype, status, self.cenv.host)
         return True
 
     def do_add_rule(self):
@@ -496,9 +503,11 @@
         else:
             filetype = 
clouseau.retention.utils.ruleutils.text_to_entrytype('file')
 
-        clouseau.retention.utils.ruleutils.do_add_rule(self.cdb, path, 
filetype, status, self.cenv.host)
+        clouseau.retention.utils.ruleutils.do_add_rule(
+            self.cdb, path, filetype, status, self.cenv.host)
         # update the ignores list since we have a new rule
-        results = 
clouseau.retention.utils.ignores.get_ignored_from_rulestore(self.cdb, 
[self.cenv.host])
+        results = clouseau.retention.utils.ignores.get_ignored_from_rulestore(
+            self.cdb, [self.cenv.host])
         if self.cenv.host in results:
             self.ignored_from_rulestore[self.cenv.host] = 
results[self.cenv.host]
         return True
@@ -526,11 +535,12 @@
             if prefix == "":
                 prefix = "/"
             if status == 'a' or status == 'A':
-                clouseau.retention.utils.ruleutils.show_rules(self.cdb, 
self.cenv.host, prefix=prefix)
+                clouseau.retention.utils.ruleutils.show_rules(
+                    self.cdb, self.cenv.host, prefix=prefix)
                 return True
             elif status[0].upper() in Status.STATUSES:
-                clouseau.retention.utils.ruleutils.show_rules(self.cdb, 
self.cenv.host, status[0].upper(),
-                                                        prefix=prefix)
+                clouseau.retention.utils.ruleutils.show_rules(
+                    self.cdb, self.cenv.host, status[0].upper(), prefix=prefix)
                 return True
 
     def do_remove_rule(self):
@@ -547,7 +557,8 @@
             path = path[:-1]
         clouseau.retention.utils.ruleutils.do_remove_rule(self.cdb, path, 
self.cenv.host)
         # update the ignores list since we removed a rule
-        results = 
clouseau.retention.utils.ignores.get_ignored_from_rulestore(self.cdb, 
[self.cenv.host])
+        results = clouseau.retention.utils.ignores.get_ignored_from_rulestore(
+            self.cdb, [self.cenv.host])
         if self.cenv.host in results:
             self.ignored_from_rulestore[self.cenv.host] = 
results[self.cenv.host]
         return True
@@ -570,25 +581,29 @@
             result = self.do_show_rules_with_status()
         elif command == 'D' or command == 'd':
             self.dircontents.get(self.cenv.host, self.cenv.cwdir, self.batchno)
-            clouseau.retention.utils.ruleutils.get_rules_for_path(self.cdb, 
self.cenv.cwdir, self.cenv.host)
+            clouseau.retention.utils.ruleutils.get_rules_for_path(self.cdb, 
self.cenv.cwdir,
+                                                                  
self.cenv.host)
             result = True
         elif command == 'C' or command == 'c':
             self.dircontents.get(self.cenv.host, self.cenv.cwdir, self.batchno)
-            clouseau.retention.utils.ruleutils.get_rules_for_entries(self.cdb, 
self.cenv.cwdir,
-                                                               
self.dircontents.entries_dict,
-                                                               self.cenv.host)
+            clouseau.retention.utils.ruleutils.get_rules_for_entries(
+                self.cdb, self.cenv.cwdir,
+                self.dircontents.entries_dict,
+                self.cenv.host)
             result = True
         elif command == 'R' or command == 'r':
             result = self.do_remove_rule()
         elif command == 'I' or command == 'i':
             rules_path = self.get_rules_path()
             if rules_path != '':
-                clouseau.retention.utils.ruleutils.import_rules(self.cdb, 
rules_path, self.cenv.host)
+                clouseau.retention.utils.ruleutils.import_rules(self.cdb, 
rules_path,
+                                                                self.cenv.host)
             result = True
         elif command == 'E' or command == 'e':
             rules_path = self.get_rules_path()
             if rules_path != '':
-                clouseau.retention.utils.ruleutils.export_rules(self.cdb, 
rules_path, self.cenv.host)
+                clouseau.retention.utils.ruleutils.export_rules(self.cdb, 
rules_path,
+                                                                self.cenv.host)
             result = True
         elif command == 'Q' or command == 'q':
             print "quitting this level"
@@ -678,7 +693,8 @@
                 print 'Already at top', self.cenv.cwdir
             result = True
         elif command == 'E' or command == 'e':
-            self.dircontents.show(self.cenv.host, self.cenv.cwdir, 1, 
self.filtertype, self.entry_is_not_ignored)
+            self.dircontents.show(self.cenv.host, self.cenv.cwdir, 1,
+                                  self.filtertype, self.entry_is_not_ignored)
             result = True
         elif command == 'C' or command == 'c':
             self.do_file_contents()
@@ -710,7 +726,8 @@
                 command = self.show_menu('status')
                 continuing = self.do_command(command, 'status', dir_path)
         elif command == 'E' or command == 'e':
-            self.dircontents.show(self.cenv.host, self.cenv.cwdir, 1, 
self.filtertype, self.entry_is_not_ignored)
+            self.dircontents.show(self.cenv.host, self.cenv.cwdir, 1, 
self.filtertype,
+                                  self.entry_is_not_ignored)
             continuing = True
             while continuing:
                 # fixme this should let the user page through batches,
@@ -750,9 +767,10 @@
             if command in Status.STATUSES:
                 # this option is invoked on a directory so
                 # type is dir every time
-                clouseau.retention.utils.ruleutils.do_add_rule(self.cdb, 
dir_path,
-                                                         
clouseau.retention.utils.ruleutils.text_to_entrytype('dir'),
-                                                         command, 
self.cenv.host)
+                clouseau.retention.utils.ruleutils.do_add_rule(
+                    self.cdb, dir_path,
+                    
clouseau.retention.utils.ruleutils.text_to_entrytype('dir'),
+                    command, self.cenv.host)
                 return None
             elif command == 'Q' or command == 'q':
                 return None
diff --git a/clouseau/clouseau/retention/remote/remotefileauditor.py 
b/clouseau/clouseau/retention/remote/remotefileauditor.py
index c1ba303..8919220 100644
--- a/clouseau/clouseau/retention/remote/remotefileauditor.py
+++ b/clouseau/clouseau/retention/remote/remotefileauditor.py
@@ -133,7 +133,8 @@
         self.max_files = maxfiles
         self.set_up_max_files(maxfiles)
 
-        self.magic = 
clouseau.retention.utils.magic.magic_open(clouseau.retention.utils.magic.MAGIC_NONE)
+        self.magic = clouseau.retention.utils.magic.magic_open(
+            clouseau.retention.utils.magic.MAGIC_NONE)
         self.magic.load()
         self.summary = None
         self.display_from_dict = FileInfo.display_from_dict
@@ -209,7 +210,7 @@
             clouseau.retention.utils.ruleutils.export_rules(self.cdb, 
all_destpath, host)
             good_destpath = os.path.join(destdir, host + "_store_good.yaml")
             clouseau.retention.utils.ruleutils.export_rules(self.cdb, 
good_destpath, host,
-                                                      
Status.text_to_status('good'))
+                                                            
Status.text_to_status('good'))
 
     def normalize(self, fname):
         '''
@@ -365,7 +366,8 @@
         hostlist = report.keys()
         for host in hostlist:
             try:
-                problem_rules = 
clouseau.retention.utils.ruleutils.get_rules(self.cdb, host, 
Status.text_to_status('problem'))
+                problem_rules = clouseau.retention.utils.ruleutils.get_rules(
+                    self.cdb, host, Status.text_to_status('problem'))
             except:
                 print 'WARNING: problem retrieving problem rules for host', 
host
                 problem_rules = None
@@ -378,9 +380,10 @@
             if dirs_problem is not None:
                 dirs_problem = list(set(dirs_problem))
                 for dirname in dirs_problem:
-                    clouseau.retention.utils.ruleutils.do_add_rule(self.cdb, 
dirname,
-                                                             
clouseau.retention.utils.ruleutils.text_to_entrytype('dir'),
-                                                             
Status.text_to_status('problem'), host)
+                    clouseau.retention.utils.ruleutils.do_add_rule(
+                        self.cdb, dirname,
+                        
clouseau.retention.utils.ruleutils.text_to_entrytype('dir'),
+                        Status.text_to_status('problem'), host)
 
             if dirs_skipped is not None:
                 dirs_skipped = list(set(dirs_skipped))
@@ -388,6 +391,7 @@
                     if dirname in dirs_problem or dirname in existing_problems:
                         # problem report overrides 'too many to audit'
                         continue
-                    clouseau.retention.utils.ruleutils.do_add_rule(self.cdb, 
dirname,
-                                                             
clouseau.retention.utils.ruleutils.text_to_entrytype('dir'),
-                                                             
Status.text_to_status('unreviewed'), host)
+                    clouseau.retention.utils.ruleutils.do_add_rule(
+                        self.cdb, dirname,
+                        
clouseau.retention.utils.ruleutils.text_to_entrytype('dir'),
+                        Status.text_to_status('unreviewed'), host)
diff --git a/clouseau/clouseau/retention/remote/remotelogauditor.py 
b/clouseau/clouseau/retention/remote/remotelogauditor.py
index 916d7fc..8f1aaa3 100644
--- a/clouseau/clouseau/retention/remote/remotelogauditor.py
+++ b/clouseau/clouseau/retention/remote/remotelogauditor.py
@@ -70,7 +70,8 @@
                 try:
                     lines = audit_results[host].split('\n')
                     for line in lines:
-                        if 
clouseau.retention.remote.remotefileauditor.display_summary_line(line, 'host', 
host):
+                        if 
clouseau.retention.remote.remotefileauditor.display_summary_line(
+                                line, 'host', host):
                             continue
                         output.append(json.loads(
                             line, object_hook=JsonHelper.decode_dict))
diff --git a/clouseau/clouseau/retention/utils/config.py 
b/clouseau/clouseau/retention/utils/config.py
index efb9af2..e78ea91 100644
--- a/clouseau/clouseau/retention/utils/config.py
+++ b/clouseau/clouseau/retention/utils/config.py
@@ -14,7 +14,8 @@
         conf = {}
         try:
             contents = open(configfile).read()
-            yamlcontents = salt.utils.yamlloader.load(contents, 
Loader=salt.utils.yamlloader.SaltYamlSafeLoader)
+            yamlcontents = salt.utils.yamlloader.load(
+                contents, Loader=salt.utils.yamlloader.SaltYamlSafeLoader)
             # fixme do I need this or will a direct assign get it?
             for key in yamlcontents:
                 conf[key] = yamlcontents[key]
diff --git a/clouseau/clouseau/retention/utils/fileinfo.py 
b/clouseau/clouseau/retention/utils/fileinfo.py
index 1d6f641..3d13e2f 100644
--- a/clouseau/clouseau/retention/utils/fileinfo.py
+++ b/clouseau/clouseau/retention/utils/fileinfo.py
@@ -582,7 +582,8 @@
         item = self.produce_dict()
 
         if prettyprint:
-            output = ("file:%s %s owner:%s  creat:%s mod:%s open:%s empty:%s 
rot:%s old:%s notifempty:%s, type:%s"
+            output = ("file:%s %s owner:%s  creat:%s mod:%s "
+                      "open:%s empty:%s rot:%s old:%s notifempty:%s, type:%s"
                       % (item['path'].ljust(path_justify),
                          item['normalized'].ljust(norm_justify),
                          item['owner'].ljust(5), item['ctime'],
@@ -597,7 +598,8 @@
 
     @staticmethod
     def display_from_dict(item, show_content=False, path_justify=None, 
norm_justify=None):
-        print ("file:%s %s  owner:%s creat:%s mod:%s open:%s empty:%s rot:%s 
old:%s notifempty:%s type:%s"
+        print ("file:%s %s  owner:%s creat:%s mod:%s open:%s "
+               "empty:%s rot:%s old:%s notifempty:%s type:%s"
                % (item['path'].ljust(path_justify),
                   item['normalized'].ljust(norm_justify),
                   item['owner'].ljust(5), item['ctime'],
diff --git a/clouseau/clouseau/retention/utils/ignores.py 
b/clouseau/clouseau/retention/utils/ignores.py
index 1b1588c..f793984 100644
--- a/clouseau/clouseau/retention/utils/ignores.py
+++ b/clouseau/clouseau/retention/utils/ignores.py
@@ -269,7 +269,8 @@
         if os.path.exists(configfile):
             try:
                 contents = open(configfile).read()
-                ign = salt.utils.yamlloader.load(contents, 
Loader=salt.utils.yamlloader.SaltYamlSafeLoader)
+                ign = salt.utils.yamlloader.load(
+                    contents, Loader=salt.utils.yamlloader.SaltYamlSafeLoader)
                 if 'ignored_files' in ign:
                     ignored['files'] = ign['ignored_files']
                 if 'ignored_dirs' in ign:
@@ -305,7 +306,8 @@
     if os.path.exists(configfile):
         try:
             contents = open(configfile).read()
-            yamlcontents = salt.utils.yamlloader.load(contents, 
Loader=salt.utils.yamlloader.SaltYamlSafeLoader)
+            yamlcontents = salt.utils.yamlloader.load(
+                contents, Loader=salt.utils.yamlloader.SaltYamlSafeLoader)
             perhost_ignores = yamlcontents['perhostcf']
         except:
             perhost_ignores = None
@@ -348,9 +350,12 @@
     '''
 
     def __init__(self, confdir):
-        self.global_ignored = 
clouseau.retention.utils.ignores.set_up_global_ignored(confdir)
-        perhost_ignored = 
clouseau.retention.utils.ignores.get_perhost_ignored_from_file(confdir)
-        self.perhost_ignored = 
clouseau.retention.utils.ignores.convert_perhost_ignored(perhost_ignored)
+        self.global_ignored = 
clouseau.retention.utils.ignores.set_up_global_ignored(
+            confdir)
+        perhost_ignored = 
clouseau.retention.utils.ignores.get_perhost_ignored_from_file(
+            confdir)
+        self.perhost_ignored = 
clouseau.retention.utils.ignores.convert_perhost_ignored(
+            perhost_ignored)
 
     def merge(self, ignoreds, hostname=None):
         '''
@@ -368,7 +373,8 @@
                     if item not in result[igntype]:
                         result[igntype][item] = list(ign[igntype][item])
                     else:
-                        result[igntype][item] = list(set(result[igntype][item] 
+ ign[igntype][item]))
+                        result[igntype][item] = list(set(result[igntype][item] 
+
+                                                         ign[igntype][item]))
         return result
 
     def show_ignored(self, basedirs, ignored, igntype, text):
@@ -386,5 +392,7 @@
         for ignored in ignoreds:
             self.show_ignored(basedirs, ignored, 'dirs', 'the following 
directories')
             self.show_ignored(basedirs, ignored, 'files', 'the following 
files')
-            self.show_ignored(basedirs, ignored, 'prefixes', 'files starting 
with the following')
-            self.show_ignored(basedirs, ignored, 'extensions', 'files ending 
with the following')
+            self.show_ignored(basedirs, ignored, 'prefixes',
+                              'files starting with the following')
+            self.show_ignored(basedirs, ignored, 'extensions',
+                              'files ending with the following')
diff --git a/clouseau/clouseau/retention/utils/ruleutils.py 
b/clouseau/clouseau/retention/utils/ruleutils.py
index 6b585b5..26fc70e 100644
--- a/clouseau/clouseau/retention/utils/ruleutils.py
+++ b/clouseau/clouseau/retention/utils/ruleutils.py
@@ -71,7 +71,8 @@
         sys.stderr.write("Couldn't read rules from %s.\n" % rules_path)
         return
 
-    yaml_contents = salt.utils.yamlloader.load(contents, 
Loader=salt.utils.yamlloader.SaltYamlSafeLoader)
+    yaml_contents = salt.utils.yamlloader.load(
+        contents, Loader=salt.utils.yamlloader.SaltYamlSafeLoader)
     for status in Status.status_cf:
         if status in yaml_contents:
             import_rule_list(
diff --git a/clouseau/clouseau/retention/utils/runner.py 
b/clouseau/clouseau/retention/utils/runner.py
index f9bf5f3..cc34619 100644
--- a/clouseau/clouseau/retention/utils/runner.py
+++ b/clouseau/clouseau/retention/utils/runner.py
@@ -65,11 +65,15 @@
                                 "data_retention.d")
             contents = 
clouseau.retention.utils.ignores.prep_good_rules_tosend(path, hosts)
             if contents:
-                new_result = client.cmd_full_return(hosts, 'cp.recv', 
[contents, os.path.join(self.confdir, 'fromstore')],
-                                                    expr_form='list')
+                new_result = client.cmd_full_return(
+                    hosts, 'cp.recv',
+                    [contents, os.path.join(self.confdir, 'fromstore')],
+                    expr_form='list')
             # step two: run the appropriate salt audit module function
-            new_result = client.cmd(hosts, "retentionaudit.%s" % 
self.get_auditfunction_name(), self.auditmodule_args,
-                                    expr_form='list', timeout=self.timeout)
+            new_result = client.cmd(
+                hosts, "retentionaudit.%s" % self.get_auditfunction_name(),
+                self.auditmodule_args,
+                expr_form='list', timeout=self.timeout)
 
             if new_result is not None:
                 result.update(new_result)
diff --git a/clouseau/scripts/retention/data_auditor.py 
b/clouseau/scripts/retention/data_auditor.py
index 3c893fb..8fdba09 100644
--- a/clouseau/scripts/retention/data_auditor.py
+++ b/clouseau/scripts/retention/data_auditor.py
@@ -251,7 +251,8 @@
                                       timeout, maxfiles, store_filepath, 
verbose)
         report = logsaudit.audit_hosts()
         if interactive:
-            cmdline = CommandLine(confdir, store_filepath, timeout, 
audit_type, ignore_also, hosts_expr)
+            cmdline = CommandLine(confdir, store_filepath, timeout,
+                                  audit_type, ignore_also, hosts_expr)
             cmdline.run(report)
 
     elif audit_type == 'root':
@@ -263,7 +264,8 @@
                                         timeout, maxfiles, store_filepath, 
verbose)
         report = filesaudit.audit_hosts()
         if interactive:
-            cmdline = CommandLine(confdir, store_filepath, timeout, 
audit_type, ignore_also, hosts_expr)
+            cmdline = CommandLine(confdir, store_filepath, timeout,
+                                  audit_type, ignore_also, hosts_expr)
             cmdline.run(report)
 
     elif audit_type == 'homes':
@@ -275,7 +277,8 @@
                                         timeout, maxfiles, store_filepath, 
verbose)
         report = homesaudit.audit_hosts()
         if interactive:
-            cmdline = CommandLine(confdir, store_filepath, timeout, 
audit_type, ignore_also, hosts_expr)
+            cmdline = CommandLine(confdir, store_filepath, timeout,
+                                  audit_type, ignore_also, hosts_expr)
             cmdline.run(report)
 
 if __name__ == '__main__':

-- 
To view, visit https://gerrit.wikimedia.org/r/233476
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I231df12881a08c75fe80408b155cfd5a47929955
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to