]> err.no Git - dak/commitdiff
dak/admin.py: use get_archive wrapper, simplifying the code slightly
authorTollef Fog Heen <tfheen@varnish-software.com>
Thu, 13 Dec 2012 07:40:41 +0000 (08:40 +0100)
committerTollef Fog Heen <tfheen@err.no>
Mon, 9 Sep 2013 11:10:54 +0000 (13:10 +0200)
Signed-off-by: Tollef Fog Heen <tfheen@varnish-software.com>
dak/admin.py

index 7400a1e715ec36998773fd6bd71b3efe34b8b4e3..63514ef4534e295f95bf0d84b5d319499fcfab77 100755 (executable)
@@ -442,7 +442,7 @@ def archive_add(args):
 
 def archive_rm(name):
     session = DBConn().session()
-    archive = session.query(Archive).filter_by(archive_name=name).one()
+    archive = get_archive(name, session)
     session.delete(archive)
     session.flush()