kete: default to 'list' if we don't have a subcommand

pull/12/merge
Peter Hutterer 2018-01-23 09:05:17 +10:00
parent fc81356d25
commit e5d3da5590
1 changed files with 4 additions and 0 deletions

View File

@ -247,6 +247,7 @@ def print_device(d):
def cmd_list(manager, args):
logger.debug('Listing available devices:')
for d in manager.devices:
print_device(d)
@ -290,6 +291,9 @@ def main(args):
try:
with TuhiKeteManager() as mgr:
if not hasattr(args, 'func'):
args.func = cmd_list
args.func(mgr, args)
except DBusError as e: