def main(args): if platform.system() == 'Windows': # pragma: no cover _windows_fixes() args, shell = get_shell(args) action_name = None if len(args) < 2: appname = None else: appname = args[1].strip() if appname.endswith('/'): appname = appname[:-1] from stoq.lib.applist import get_application_names apps = get_application_names() if not appname in apps: raise SystemExit("'%s' is not an application. " "Valid applications are: %s" % (appname, apps)) if len(args) > 2: action_name = args[2] shell.main(appname, action_name)
def main(args): args, shell = get_shell(args) if len(args) < 2: appname = None else: appname = args[1].strip() if appname.endswith('/'): appname = appname[:-1] from stoq.lib.applist import get_application_names apps = get_application_names() if not appname in apps: raise SystemExit("'%s' is not an application. " "Valid applications are: %s" % (appname, apps)) shell.main(appname)