ArielGlenn has submitted this change and it was merged.
Change subject: get rid of executor and related vars for most files
......................................................................
get rid of executor and related vars for most files
cli and examiner need to be converted to use salt.cp_getfile
but all the rest now run local/remote via salt alone
Change-Id: Ib6c4a2243a13a6b0af7648c352411f0fb0f863ff
---
M dataretention/data_auditor.py
M dataretention/retention/localhomeaudit.py
M dataretention/retention/locallogaudit.py
M dataretention/retention/remotefileauditor.py
M dataretention/retention/remotehomeauditor.py
M dataretention/retention/remotelogauditor.py
6 files changed, 0 insertions(+), 27 deletions(-)
Approvals:
ArielGlenn: Verified; Looks good to me, approved
diff --git a/dataretention/data_auditor.py b/dataretention/data_auditor.py
index 5031a6e..3410df3 100644
--- a/dataretention/data_auditor.py
+++ b/dataretention/data_auditor.py
@@ -101,16 +101,6 @@
sys.exit(1)
-global_keys = [key for key, value_unused in
- sys.modules[__name__].__dict__.items()]
-if 'executor' not in global_keys:
- def executor():
- # this function is generated by the caller on the salt master
- # and passed along with the code to remote clients.
- # someone reaching this version of the function did so by
- # mistake (calling the script locally without args).
- usage()
-
def main():
if len(sys.argv) == 1:
# special case, no args, we expect a special
diff --git a/dataretention/retention/localhomeaudit.py
b/dataretention/retention/localhomeaudit.py
index c6b92d4..10bdcf2 100644
--- a/dataretention/retention/localhomeaudit.py
+++ b/dataretention/retention/localhomeaudit.py
@@ -8,10 +8,6 @@
from retention.config import Config
from retention.localfileaudit import LocalFilesAuditor
-global_keys = [key for key, value_unused in
- sys.modules[__name__].__dict__.items()]
-
-
class LocalHomesAuditor(LocalFilesAuditor):
'''
auditing of home directories on a set of hosts
diff --git a/dataretention/retention/locallogaudit.py
b/dataretention/retention/locallogaudit.py
index cf03239..c3b7571 100644
--- a/dataretention/retention/locallogaudit.py
+++ b/dataretention/retention/locallogaudit.py
@@ -11,10 +11,6 @@
from retention.localfileaudit import LocalFilesAuditor
import retention.fileutils
-global_keys = [key for key, value_unused in
- sys.modules[__name__].__dict__.items()]
-
-
class LocalLogsAuditor(LocalFilesAuditor):
def __init__(self, audit_type,
oldest=False,
diff --git a/dataretention/retention/remotefileauditor.py
b/dataretention/retention/remotefileauditor.py
index 040b58b..ed7fbdd 100644
--- a/dataretention/retention/remotefileauditor.py
+++ b/dataretention/retention/remotefileauditor.py
@@ -19,9 +19,6 @@
from retention.localfileaudit import LocalFilesAuditor
import retention.ruleutils
-global_keys = [key for key, value_unused in
- sys.modules[__name__].__dict__.items()]
-
def get_dirs_toexamine(host_report):
'''
given full report output from host (list of
diff --git a/dataretention/retention/remotehomeauditor.py
b/dataretention/retention/remotehomeauditor.py
index 7db2702..1f0e040 100644
--- a/dataretention/retention/remotehomeauditor.py
+++ b/dataretention/retention/remotehomeauditor.py
@@ -7,9 +7,6 @@
import retention.magic
from retention.remotefileauditor import RemoteFilesAuditor
-global_keys = [key for key, value_unused in
- sys.modules[__name__].__dict__.items()]
-
class RemoteHomesAuditor(RemoteFilesAuditor):
'''
diff --git a/dataretention/retention/remotelogauditor.py
b/dataretention/retention/remotelogauditor.py
index 279091b..d917d9f 100644
--- a/dataretention/retention/remotelogauditor.py
+++ b/dataretention/retention/remotelogauditor.py
@@ -10,9 +10,6 @@
from retention.remotefileauditor import RemoteFilesAuditor
-global_keys = [key for key, value_unused in
- sys.modules[__name__].__dict__.items()]
-
class RemoteLogsAuditor(RemoteFilesAuditor):
def __init__(self, hosts_expr, audit_type, prettyprint=False,
oldest=False,
--
To view, visit https://gerrit.wikimedia.org/r/233458
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6c4a2243a13a6b0af7648c352411f0fb0f863ff
Gerrit-PatchSet: 2
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits