From b75edb982bebf6a88e242caca94f013867bc9bd2 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Fri, 25 Mar 2011 13:49:27 +0000 Subject: [PATCH] admin: Show options set in configuration database Signed-off-by: Ansgar Burchardt --- dak/admin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.5