From 28c61b7ca13119c5fe324739f9a6bfe3a35dcce4 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 8 Aug 2014 17:26:21 +0100 Subject: [distupgrade,openshift] fix regex substitution API usage These two were using the legacy (sos-2.x) methods names. Signed-off-by: Bryn M. Reeves --- sos/plugins/distupgrade.py | 6 +++--- 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 -- cgit