From 97063d26e56b7dccf73ec548e82ccd101d8cbd83 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Jun 2010 13:23:13 +0000 Subject: Updated files to match PEP 257 git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5897 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Tools/APT.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/lib/Client/Tools/APT.py') diff --git a/src/lib/Client/Tools/APT.py b/src/lib/Client/Tools/APT.py index 082e51ef6..3f02242ce 100644 --- a/src/lib/Client/Tools/APT.py +++ b/src/lib/Client/Tools/APT.py @@ -1,4 +1,4 @@ -'''This is the bcfg2 support for apt-get''' +"""This is the bcfg2 support for apt-get""" __revision__ = '$Revision$' # suppress apt API warnings @@ -27,8 +27,10 @@ APTGET = '%s/bin/apt-get' % install_path DPKG = '%s/bin/dpkg' % install_path class APT(Bcfg2.Client.Tools.Tool): - '''The Debian toolset implements package and service operations and inherits - the rest from Toolset.Toolset''' + """The Debian toolset implements package and service operations and inherits + the rest from Toolset.Toolset. + + """ name = 'APT' __execs__ = [DEBSUMS, APTGET, DPKG] __handles__ = [('Package', 'deb')] @@ -61,7 +63,7 @@ class APT(Bcfg2.Client.Tools.Tool): self.pkg_cache = apt.cache.Cache() def FindExtra(self): - '''Find extra packages''' + """Find extra packages.""" packages = [entry.get('name') for entry in self.getSupportedEntries()] extras = [(p.name, p.installedVersion) for p in self.pkg_cache if p.isInstalled and p.name not in packages] @@ -109,7 +111,7 @@ class APT(Bcfg2.Client.Tools.Tool): return True def VerifyPackage(self, entry, modlist, checksums=True): - '''Verify package for entry''' + """Verify package for entry.""" if not 'version' in entry.attrib: self.logger.info("Cannot verify unversioned package %s" % (entry.attrib['name'])) @@ -146,7 +148,7 @@ class APT(Bcfg2.Client.Tools.Tool): return True def Remove(self, packages): - '''Deal with extra configuration detected''' + """Deal with extra configuration detected.""" pkgnames = " ".join([pkg.get('name') for pkg in packages]) self.pkg_cache = apt.cache.Cache() if len(packages) > 0: -- cgit v1.2.3-1-g7c22