本文整理汇总了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.')
示例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.')
示例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