diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-08-08 17:26:21 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-08-08 17:26:21 +0100 |
commit | 28c61b7ca13119c5fe324739f9a6bfe3a35dcce4 (patch) | |
tree | 25deb71626ccd4b9ef09e422846ebc9d5cea0492 | |
parent | eb7c167f6fc8d30d3fd1d5f8a79160a6f97be2bf (diff) | |
download | sos-28c61b7ca13119c5fe324739f9a6bfe3a35dcce4.tar.gz |
[distupgrade,openshift] fix regex substitution API usage
These two were using the legacy (sos-2.x) methods names.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/distupgrade.py | 6 | ||||
-rw-r--r-- | sos/plugins/openshift.py | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/sos/plugins/distupgrade.py b/sos/plugins/distupgrade.py index eeba0ed2..d18ab9e3 100644 --- a/sos/plugins/distupgrade.py +++ b/sos/plugins/distupgrade.py @@ -35,19 +35,19 @@ class RedHatDistUpgrade(DistUpgrade, RedHatPlugin): ) def postproc(self): - self.doRegexSub( + self.do_file_sub( "/root/preupgrade/kickstart/anaconda-ks.cfg", r"(useradd --password) (.*)", r"\1 ********" ) - self.doRegexSub( + self.do_file_sub( "/root/preupgrade/kickstart/anaconda-ks.cfg", r"(\s*rootpw\s*).*", r"\1********" ) - self.doRegexSub( + self.do_file_sub( "/root/preupgrade/kickstart/untrackeduser", r"\/home\/.*", r"/home/******** path redacted ********" diff --git a/sos/plugins/openshift.py b/sos/plugins/openshift.py index 7879630f..9c986d36 100644 --- a/sos/plugins/openshift.py +++ b/sos/plugins/openshift.py @@ -99,13 +99,13 @@ class Openshift(Plugin, RedHatPlugin): # Redact passwords of the form: # plugin.activemq.pool.1.password = Pa$sW0Rd - self.doRegexSub("/opt/%s/%s/root/etc/mcollective/server.cfg" % - (self.vendor, self.ruby), - r"(.*password\s*=\s*)\S+", - r"\1********") - self.doRegexSub("/opt/%s/%s/root/etc/mcollective/client.cfg" % - (self.vendor, self.ruby), - r"(.*password\s*=\s*)\S+", - r"\1********") + self.do_file_sub("/opt/%s/%s/root/etc/mcollective/server.cfg" % + (self.vendor, self.ruby), + r"(.*password\s*=\s*)\S+", + r"\1********") + self.do_file_sub("/opt/%s/%s/root/etc/mcollective/client.cfg" % + (self.vendor, self.ruby), + r"(.*password\s*=\s*)\S+", + r"\1********") # vim: et ts=4 sw=4 |