diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2015-02-25 10:50:28 -0600 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2015-02-25 10:50:28 -0600 |
commit | 12b769d5864c9e04235184d38a5089f1ee655c8c (patch) | |
tree | 39ff502694eb8d47405603879ffd3031a967bad2 /src/lib/Bcfg2/Client/Tools/APT.py | |
parent | e07faec3156ed49347b7219d1032b5ef79be9269 (diff) | |
parent | cae39b746051ff5f3257342d0659340283b2d6ef (diff) | |
download | bcfg2-12b769d5864c9e04235184d38a5089f1ee655c8c.tar.gz bcfg2-12b769d5864c9e04235184d38a5089f1ee655c8c.tar.bz2 bcfg2-12b769d5864c9e04235184d38a5089f1ee655c8c.zip |
Merge pull request #267 from stpierre/pylint-0.28-maint
Fix pylint errors
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools/APT.py')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/APT.py | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/APT.py b/src/lib/Bcfg2/Client/Tools/APT.py index 300c9bc51..3c511681f 100644 --- a/src/lib/Bcfg2/Client/Tools/APT.py +++ b/src/lib/Bcfg2/Client/Tools/APT.py @@ -1,12 +1,10 @@ """This is the Bcfg2 support for apt-get.""" -# suppress apt API warnings -import warnings -warnings.filterwarnings("ignore", "apt API not stable yet", - FutureWarning) -import apt.cache import os import sys + +import apt.cache + import Bcfg2.Client.Tools @@ -47,20 +45,20 @@ class APT(Bcfg2.Client.Tools.Tool): for entry in struct if entry.tag == 'Path' and entry.get('type') == 'ignore'] - self.__important__ = self.__important__ + \ - ["%s/cache/debconf/config.dat" % self.var_path, - "%s/cache/debconf/templates.dat" % self.var_path, - '/etc/passwd', '/etc/group', - '%s/apt/apt.conf' % self.etc_path, - '%s/dpkg/dpkg.cfg' % self.etc_path] + \ + self.__important__ = self.__important__ + [ + "%s/cache/debconf/config.dat" % self.var_path, + "%s/cache/debconf/templates.dat" % self.var_path, + '/etc/passwd', '/etc/group', + '%s/apt/apt.conf' % self.etc_path, + '%s/dpkg/dpkg.cfg' % self.etc_path] + \ [entry.get('name') for struct in config for entry in struct - if entry.tag == 'Path' and - entry.get('name').startswith( - '%s/apt/sources.list' % self.etc_path)] + if (entry.tag == 'Path' and + entry.get('name').startswith( + '%s/apt/sources.list' % self.etc_path)] self.nonexistent = [entry.get('name') for struct in config for entry in struct - if entry.tag == 'Path' and - entry.get('type') == 'nonexistent'] + if (entry.tag == 'Path' and + entry.get('type') == 'nonexistent')] os.environ["DEBIAN_FRONTEND"] = 'noninteractive' self.actions = {} if self.setup['kevlar'] and not self.setup['dryrun']: |