summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/Tools/APT.py
diff options
context:
space:
mode:
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']: