From 075153bfd88e83550224b84be648307335766ed9 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Fri, 29 Jul 2011 14:30:58 +0100 Subject: [PATCH] Add error handling to find-null-maintainers Signed-off-by: Mark Hymers --- dak/find_null_maintainers.py | 7 +++++++ 1 file changed, 7 insertions(+) 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..." -- 2.39.5