本文整理匯總了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))