From 32e994d9c891ba379af7b292eeb81b4402d3f2af Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 25 Nov 2009 23:40:36 +0100 Subject: [PATCH] print an error and exit if python-apt is not installed for apt-mark, thanks Carl Chenet! (Closes: #521284) --- cmdline/apt-mark | 7 ++++--- debian/changelog | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmdline/apt-mark b/cmdline/apt-mark index c44ce703..3a818a3d 100755 --- a/cmdline/apt-mark +++ b/cmdline/apt-mark @@ -2,13 +2,14 @@ from optparse import OptionParser +import sys +import os.path + try: import apt_pkg except ImportError: print "Error importing apt_pkg, is python-apt installed?" - -import sys -import os.path + sys.exit(1) actions = { "markauto" : 1, "unmarkauto": 0 diff --git a/debian/changelog b/debian/changelog index 1bd34e52..0cfb5ff3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -64,6 +64,8 @@ apt (0.7.25) UNRELEASED; urgency=low * cmdline/apt-mark: - print an error if a new state file can't be created, thanks Carl Chenet! (Closes: #521289) + - print an error and exit if python-apt is not installed, + thanks Carl Chenet! (Closes: #521284) * methods/http{,s}.cc - add config setting for User-Agent to the Acquire group, thanks Timothy J. Miller! (Closes: #355782) -- 2.20.1