fix usage and listing
This commit is contained in:
+1
-1
@@ -96,8 +96,8 @@ def get_services(db):
|
||||
GROUP BY
|
||||
service.name;
|
||||
''')
|
||||
db.commit()
|
||||
ret = {name: failures for (name, failures) in cur.fetchall()}
|
||||
db.commit()
|
||||
return ret
|
||||
|
||||
|
||||
|
||||
@@ -96,7 +96,11 @@ documentation for details.''')
|
||||
help='''Force clear for all services if service is
|
||||
not specified''')
|
||||
|
||||
return parser.parse_args()
|
||||
args = parser.parse_args()
|
||||
if not args.cmd:
|
||||
parser.print_help()
|
||||
sys.exit(1)
|
||||
return args
|
||||
|
||||
def cli():
|
||||
config = configparser.ConfigParser()
|
||||
@@ -116,6 +120,7 @@ def cli():
|
||||
cli_list(args, db)
|
||||
elif args.cmd == 'clear':
|
||||
cli_clear(args, db)
|
||||
else:
|
||||
|
||||
sysalert.db.close(db)
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user