コード例 #1
0
ファイル: main.py プロジェクト: sarkis89/stoq
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)
コード例 #2
0
ファイル: main.py プロジェクト: hackedbellini/stoq
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)
コード例 #3
0
ファイル: main.py プロジェクト: romaia/stoq
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)
コード例 #4
0
ファイル: main.py プロジェクト: tmaxter/stoq
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)