From: Ansgar Burchardt Date: Fri, 25 Mar 2011 13:49:27 +0000 (+0000) Subject: admin: Show options set in configuration database X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b75edb982bebf6a88e242caca94f013867bc9bd2;p=dak admin: Show options set in configuration database Signed-off-by: Ansgar Burchardt --- diff --git a/dak/admin.py b/dak/admin.py index 808fb887..d159651e 100755 --- a/dak/admin.py +++ b/dak/admin.py @@ -59,6 +59,7 @@ Perform administrative work on the dak database. config / c: c db show db config c db-shell show db config in a usable form for psql + c NAME show option NAME as set in configuration table architecture / a: a list show a list of architectures @@ -456,7 +457,12 @@ def show_config(command): e.append('PGPORT') print "export " + " ".join(e) else: - die("E: config command unknown") + session = DBConn().session() + try: + o = session.query(DBConfig).filter_by(name = mode).one() + print o.value + except NoResultFound: + print "W: option '%s' not set" % mode dispatch['config'] = show_config dispatch['c'] = show_config