From f4414c0511417d2ea09c4fca6e7870deaabb17be Mon Sep 17 00:00:00 2001 From: Derek Carter Date: Tue, 10 Jul 2012 19:28:14 -0400 Subject: [PATCH 1/2] fixes #569 apt module problems on old versions of apt-python (namely debian 5.0) --- apt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apt b/apt index 1cc86a8a110..bb656a8df73 100755 --- a/apt +++ b/apt @@ -163,11 +163,11 @@ cache = apt.Cache() if default_release: apt_pkg.config['APT::Default-Release'] = default_release # reopen cache w/ modified config - cache.open() + cache.open(progress=None) if update_cache == 'yes': cache.update() - cache.open() + cache.open(progress=None) if package == None: exit_json(changed=False) From 9a6bcb94815100db77d7915cc4f5994bb9ed1213 Mon Sep 17 00:00:00 2001 From: Derek Carter Date: Tue, 10 Jul 2012 19:50:08 -0400 Subject: [PATCH 2/2] added filter for future warning --- apt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apt b/apt index bb656a8df73..0d1629e83a4 100755 --- a/apt +++ b/apt @@ -28,6 +28,10 @@ import subprocess import syslog import traceback +# added to stave off future warnings about apt api +import warnings; +warnings.filterwarnings('ignore', "apt API not stable yet", FutureWarning) + APT_PATH = "/usr/bin/apt-get" APT = "DEBIAN_PRIORITY=critical %s" % APT_PATH