]> git.decadent.org.uk Git - dak.git/commitdiff
Add error handling to find-null-maintainers
authorMark Hymers <mhy@debian.org>
Fri, 29 Jul 2011 13:30:58 +0000 (14:30 +0100)
committerMark Hymers <mhy@debian.org>
Fri, 29 Jul 2011 13:30:58 +0000 (14:30 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/find_null_maintainers.py

index 6074dbee44f1e19292595206de559e989f991fd0..730b277008a976f09af12a343b99cd555193ac5a 100755 (executable)
@@ -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..."