X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fadmin.py;h=d159651e75df850904971df8f7b3705b4bbd6837;hb=714b2bd26b5a5ba4c205de7d4fe51408edf3c14a;hp=808fb88785edb626b99d46881da114a58f276ee5;hpb=8d96479bcfd210f9cf8f5692b2982d3c3a08ba5c;p=dak.git 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