From: Mark Hymers Date: Fri, 29 Jul 2011 13:30:58 +0000 (+0100) Subject: Add error handling to find-null-maintainers X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=075153bfd88e83550224b84be648307335766ed9;p=dak.git Add error handling to find-null-maintainers Signed-off-by: Mark Hymers --- diff --git a/dak/find_null_maintainers.py b/dak/find_null_maintainers.py index 6074dbee..730b2770 100755 --- a/dak/find_null_maintainers.py +++ b/dak/find_null_maintainers.py @@ -24,6 +24,7 @@ import apt_pkg from daklib.dbconn import * from daklib.config import Config +from daklib.utils import fubar ################################################################################ @@ -58,6 +59,12 @@ def main(): if Options["Help"]: usage() + if not cnf.has_key('Import-LDAP-Fingerprints::LDAPServer'): + fubar("Import-LDAP-Fingerprints::LDAPServer not configured") + + if not cnf.has_key('Import-LDAP-Fingerprints::LDAPDn'): + fubar("Import-LDAP-Fingerprints::LDAPDn not configured") + session = DBConn().session() print "Getting info from the LDAP server..."