本文整理汇总了Python中sys.version_info.micro方法的典型用法代码示例。如果您正苦于以下问题:Python version_info.micro方法的具体用法?Python version_info.micro怎么用?Python version_info.micro使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sys.version_info
的用法示例。
在下文中一共展示了version_info.micro方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _verify_python_version
# 需要导入模块: from sys import version_info [as 别名]
# 或者: from sys.version_info import micro [as 别名]
def _verify_python_version(self, key, cafile, capath, cahostverify):
python_version_cur = ".".join([str(version_info.major),
str(version_info.minor),
str(version_info.micro)])
python_version_min = "2.7.9"
if StrictVersion(python_version_cur) < StrictVersion(python_version_min):
if cafile or capath:
raise AnsibleError('Unable to read %s from vault:'
' Using Python %s, and vault lookup plugin requires at least %s'
' to use an SSL context (VAULT_CACERT or VAULT_CAPATH)'
% (key, python_version_cur, python_version_min))
elif cahostverify:
raise AnsibleError('Unable to read %s from vault:'
' Using Python %s, and vault lookup plugin requires at least %s'
' to verify Vault certificate. (set VAULT_CAHOSTVERIFY to \'%s\''
' to disable certificate verification.)'
% (key, python_version_cur, python_version_min, DISABLE_VAULT_CAHOSTVERIFY))