Skip to content
Snippets Groups Projects
Commit 42333b02 authored by Pavel Kácha's avatar Pavel Kácha
Browse files

Streamlined return codes from comman line (thx to bodik@cesnet.cz)

parent 26e3abb9
Branches
Tags
No related merge requests found
......@@ -1423,6 +1423,7 @@ def list_clients(id=None):
divider = ["-" * l for l in col_width]
for line in [Client._fields, divider] + lines:
print " ".join([val.ljust(width) for val, width in zip(line, col_width)])
return 0
def register_client(**kwargs):
......@@ -1494,11 +1495,12 @@ def modify_client(**kwargs):
newid = server.handler.db.add_modify_client(**kwargs)
list_clients(id=newid)
return list_clients(id=newid)
def load_maps():
server.handler.db.load_maps()
return 0
def purge(days=30, lastlog=None, events=None):
......@@ -1510,6 +1512,7 @@ def purge(days=30, lastlog=None, events=None):
if events:
count = server.handler.db.purge_events(days)
print "Purged %d events." % count
return 0
def add_client_args(subargp, mod=False):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment