[kernel] r11181 - people/waldi/dkt/bin

Bastian Blank waldi at alioth.debian.org
Fri Apr 25 14:57:30 UTC 2008


Author: waldi
Date: Fri Apr 25 14:57:30 2008
New Revision: 11181

Log:
bin/dkt-maintainer: Bail out if not called in debconf.


Modified:
   people/waldi/dkt/bin/dkt-maintainer

Modified: people/waldi/dkt/bin/dkt-maintainer
==============================================================================
--- people/waldi/dkt/bin/dkt-maintainer	(original)
+++ people/waldi/dkt/bin/dkt-maintainer	Fri Apr 25 14:57:30 2008
@@ -157,9 +157,13 @@
 if __name__ == '__main__':
     from optparse import OptionParser
     parser = OptionParser(usage = usage)
+    parser.add_option("--debug", action = "store_true", dest = "debug")
     options, args = parser.parse_args()
     if len(args) < 4:
         raise RuntimeError("Too less arguments")
+    if not options.debug and not os.getenv('DEBCONF_HAS_FRONTEND'):
+        raise RuntimeError("This program expects to be run in debconf")
+
     name = args[0]
     cls = clss[name]
     cls(*args[1:])()



More information about the Kernel-svn-changes mailing list