summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/Tools/APT.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2015-02-24 16:29:07 -0600
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2015-02-25 07:59:49 -0600
commitcae39b746051ff5f3257342d0659340283b2d6ef (patch)
tree15754ec473e088b52cc8afc4d9ecaf8ee8d7ca2d /src/lib/Bcfg2/Client/Tools/APT.py
parent78cac1d0a6923ebc73ff221f8501885c36c112c1 (diff)
downloadbcfg2-cae39b746051ff5f3257342d0659340283b2d6ef.tar.gz
bcfg2-cae39b746051ff5f3257342d0659340283b2d6ef.tar.bz2
bcfg2-cae39b746051ff5f3257342d0659340283b2d6ef.zip
Fix pylint errors
This also pins pylint to <= 0.28 so we don't have to keep playing whack-a-mole with it. Also removes unnecessary suppression of apt warnings. This is no longer necessary in 12.04, so should be safe to remove. If you're on Ubuntu < 12.04, upgrade for heaven's sake.
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools/APT.py')
-rw-r--r--src/lib/Bcfg2/Client/Tools/APT.py30
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']: