From 32e994d9c891ba379af7b292eeb81b4402d3f2af Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 25 Nov 2009 23:40:36 +0100 Subject: print an error and exit if python-apt is not installed for apt-mark, thanks Carl Chenet! (Closes: #521284) --- cmdline/apt-mark | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmdline/apt-mark') diff --git a/cmdline/apt-mark b/cmdline/apt-mark index c44ce7038..3a818a3db 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 -- cgit v1.2.3