当前位置: 首页>>代码示例>>Python>>正文


Python JIRA.client_info方法代码示例

本文整理汇总了Python中jira.JIRA.client_info方法的典型用法代码示例。如果您正苦于以下问题:Python JIRA.client_info方法的具体用法?Python JIRA.client_info怎么用?Python JIRA.client_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jira.JIRA的用法示例。


在下文中一共展示了JIRA.client_info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from jira import JIRA [as 别名]
# 或者: from jira.JIRA import client_info [as 别名]
def main():
    try:
        get_ipython
    except NameError:
        pass
    else:
        exit("Running ipython inside ipython isn't supported. :(")

    options, basic_auth, oauth = get_config()

    if basic_auth:
        basic_auth = (basic_auth['username'], basic_auth['password'])

    if oauth.get('oauth_dance') is True:
        oauth = oauth_dance(
            options['server'], oauth['consumer_key'], oauth['key_cert'], oauth['print_tokens'], options['verify'])
    elif not all((oauth.get('access_token'), oauth.get('access_token_secret'),
                  oauth.get('consumer_key'), oauth.get('key_cert'))):
        oauth = None

    jira = JIRA(options=options, basic_auth=basic_auth, oauth=oauth)

    import IPython
    # The top-level `frontend` package has been deprecated since IPython 1.0.
    if IPython.version_info[0] >= 1:
        from IPython.terminal.embed import InteractiveShellEmbed
    else:
        from IPython.frontend.terminal.embed import InteractiveShellEmbed

    ip_shell = InteractiveShellEmbed(
        banner1='<JIRA Shell ' + __version__ + ' (' + jira.client_info() + ')>')
    ip_shell("*** JIRA shell active; client is in 'jira'."
             ' Press Ctrl-D to exit.')
开发者ID:frank-belldev,项目名称:jira,代码行数:35,代码来源:jirashell.py

示例2: main

# 需要导入模块: from jira import JIRA [as 别名]
# 或者: from jira.JIRA import client_info [as 别名]
def main():
    try:
        get_ipython
    except NameError:
        pass
    else:
        exit("Running ipython inside ipython isn't supported. :(")

    options, basic_auth, oauth = get_config()

    if basic_auth:
        basic_auth = (basic_auth['username'], basic_auth['password'])

    if oauth['oauth_dance']:
        oauth = oauth_dance(
            options['server'], oauth['consumer_key'], oauth['key_cert'], oauth['print_tokens'], options['verify'])
    else:
        oauth = None

    jira = JIRA(options=options, basic_auth=basic_auth, oauth=oauth)

    from IPython.frontend.terminal.embed import InteractiveShellEmbed

    ipshell = InteractiveShellEmbed(
        banner1='<JIRA Shell ' + __version__ + ' (' + jira.client_info() + ')>')
    ipshell("*** JIRA shell active; client is in 'jira'."
            ' Press Ctrl-D to exit.')
开发者ID:sebkouba,项目名称:jira,代码行数:29,代码来源:jirashell.py

示例3: main

# 需要导入模块: from jira import JIRA [as 别名]
# 或者: from jira.JIRA import client_info [as 别名]
def main():
    # workaround for avoiding UnicodeEncodeError when printing exceptions
    # containing unicode on py2
    if sys.version_info[0] < 3 and sys.getdefaultencoding() != 'utf-8':
        # without reload print would fail even if sys.stdin.encoding
        # would report utf-8
        # see: https://stackoverflow.com/a/23847316/99834
        stdin, stdout, stderr = sys.stdin, sys.stdout, sys.stderr
        reload(sys)
        sys.stdin, sys.stdout, sys.stderr = stdin, stdout, stderr
        sys.setdefaultencoding(os.environ.get('PYTHONIOENCODING', 'utf-8'))

    try:
        try:
            get_ipython
        except NameError:
            pass
        else:
            sys.exit("Running ipython inside ipython isn't supported. :(")

        options, basic_auth, oauth = get_config()

        if basic_auth:
            basic_auth = (basic_auth['username'], basic_auth['password'])

        if oauth.get('oauth_dance') is True:
            oauth = oauth_dance(
                options['server'], oauth['consumer_key'], oauth['key_cert'], oauth['print_tokens'], options['verify'])
        elif not all((oauth.get('access_token'), oauth.get('access_token_secret'),
                     oauth.get('consumer_key'), oauth.get('key_cert'))):
            oauth = None

        jira = JIRA(options=options, basic_auth=basic_auth, oauth=oauth)

        import IPython
        # The top-level `frontend` package has been deprecated since IPython 1.0.
        if IPython.version_info[0] >= 1:
            from IPython.terminal.embed import InteractiveShellEmbed
        else:
            from IPython.frontend.terminal.embed import InteractiveShellEmbed

        ip_shell = InteractiveShellEmbed(
            banner1='<JIRA Shell ' + __version__ + ' (' + jira.client_info() + ')>')
        ip_shell("*** JIRA shell active; client is in 'jira'."
                 ' Press Ctrl-D to exit.')
    except Exception as e:
        print(e, file=sys.stderr)
        return 2
开发者ID:tuukkamustonen,项目名称:jira,代码行数:50,代码来源:jirashell.py


注:本文中的jira.JIRA.client_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。