コード例 #1
0
ファイル: cli.py プロジェクト: rahulbahal7/haas
def main():
    """Entry point to the CLI.

    There is a script located at ${source_tree}/scripts/haas, which invokes
    this function.
    """
    config.setup()

    if len(sys.argv) < 2 or sys.argv[1] not in command_dict:
        # Display usage for all commands
        help()
    else:
        command_dict[sys.argv[1]](*sys.argv[2:])
コード例 #2
0
def main():
    """Entry point to the CLI.

    There is a script located at ${source_tree}/scripts/haas, which invokes
    this function.
    """
    config.setup()

    if len(sys.argv) < 2 or sys.argv[1] not in command_dict:
        # Display usage for all commands
        help()
    else:
        command_dict[sys.argv[1]](*sys.argv[2:])
コード例 #3
0
ファイル: cli.py プロジェクト: gsilvis/haas
def main():
    """Entry point to the CLI.

    There is a script located at ${source_tree}/scripts/haas, which invokes
    this function.
    """
    config.setup()

    if len(sys.argv) < 2 or sys.argv[1] not in command_dict:
        # Display usage for all commands
        help()
        sys.exit(1)
    else:
        setup_http_client()
        try:
            command_dict[sys.argv[1]](*sys.argv[2:])
        except FailedAPICallException:
            sys.exit(1)
コード例 #4
0
ファイル: cli.py プロジェクト: sarthakjagetia/hil
def main():
    """Entry point to the CLI.

    There is a script located at ${source_tree}/scripts/haas, which invokes
    this function.
    """
    config.setup()

    if len(sys.argv) < 2 or sys.argv[1] not in command_dict:
        # Display usage for all commands
        help()
        sys.exit(1)
    else:
        setup_http_client()
        try:
            command_dict[sys.argv[1]](*sys.argv[2:])
        except FailedAPICallException:
            sys.exit(1)
        except InvalidAPIArgumentsException:
            sys.exit(2)
コード例 #5
0
ファイル: admin.py プロジェクト: henn/hil
def main():
    """Entrypoint for the haas-admin command."""
    config.setup()
    model.init_db()
    manager.run()
コード例 #6
0
def main():
    """Entrypoint for the haas-admin command."""
    config.setup()
    model.init_db()
    manager.run()