print an error and exit if python-apt is not installed for apt-mark,
authorDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 25 Nov 2009 22:40:36 +0000 (23:40 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 25 Nov 2009 22:40:36 +0000 (23:40 +0100)
thanks Carl Chenet! (Closes: #521284)

cmdline/apt-mark
debian/changelog

index c44ce70..3a818a3 100755 (executable)
@@ -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
index 1bd34e5..0cfb5ff 100644 (file)
@@ -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)