From bd4a765b540ebbbfd131b8fe8b40ed70b5f2a667 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Wed, 1 Mar 2006 19:00:23 +0000 Subject: Whitespace changes in Logging.py Fix saferun usage for pkg index building in Redhat.py git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1783 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Redhat.py | 3 +-- src/lib/Logging.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/Client/Redhat.py b/src/lib/Client/Redhat.py index 3d5e3c73c..d7b28c6fe 100644 --- a/src/lib/Client/Redhat.py +++ b/src/lib/Client/Redhat.py @@ -32,8 +32,7 @@ class ToolsetImpl(Toolset): '''Refresh memory hashes of packages''' self.installed = {} for line in self.saferun("rpm -qa --qf '%{NAME} %{VERSION}-%{RELEASE}\n'")[1]: - [name, version] = line.split(' ') - self.installed[name] = version[:-1] + [self.installed.update({name:version}) for (name, version) in line.split(' ')] def VerifyService(self, entry): '''Verify Service status for entry''' diff --git a/src/lib/Logging.py b/src/lib/Logging.py index 05dc8260e..5ab6d741c 100644 --- a/src/lib/Logging.py +++ b/src/lib/Logging.py @@ -110,7 +110,7 @@ class FragmentingSysLogHandler(logging.handlers.SysLogHandler): except socket.error: self.socket.connect(self.address) self.socket.send(self.format(newrec)) - + def setup_logging(procname, to_console=True, to_syslog=True, syslog_facility='local0', level=0): '''setup logging for bcfg2 software''' if hasattr(logging, 'already_setup'): -- cgit v1.2.3-1-g7c22