本文整理汇总了Python中Base.info方法的典型用法代码示例。如果您正苦于以下问题:Python Base.info方法的具体用法?Python Base.info怎么用?Python Base.info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base.info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: validUrl
# 需要导入模块: import Base [as 别名]
# 或者: from Base import info [as 别名]
def validUrl(url):
x = int(0)
while x < int(11):
x += 1
try:
r = doHeadRequest(url)
r.raise_for_status()
Base.info('%s might be a valid url' % url)
return True
except Exception:
Base.warning('encountered a minor error going to retry')
return False
示例2: validUrl
# 需要导入模块: import Base [as 别名]
# 或者: from Base import info [as 别名]
def validUrl(url):
x = int(0)
while x < int(11):
x += 1
try:
r = requests.get(url, verify=False)
r.raise_for_status()
Base.info('%s might be a valid url' % url)
return True
except Exception as e:
Base.warning('encountered a minor error going to retry')
Base.warning('%s' % e)
return False
示例3: doHeadRequest
# 需要导入模块: import Base [as 别名]
# 或者: from Base import info [as 别名]
try:
r = doHeadRequest(url)
r.raise_for_status()
Base.info('%s might be a valid url' % url)
return True
except Exception:
Base.warning('encountered a minor error going to retry')
return False
profileList = []
atLeastOne = False
if profileUrl:
for url in profileUrl.split(';'):
Base.info("trying to add profile from url: %s" % url)
if validUrl(url):
p = XLRProfile(url=url)
p.persist_variables_to_release(__release.id)
p.handle_toggles(__release.id)
atLeastOne = True
elif profileFromRepository:
p = XLRProfile(repoId=profileFromRepository)
p.persist_variables_to_release(__release.id)
p.handle_toggles(__release.id)
atLeastOne = True
elif profiles:
profile = XLRProfile(repoString=profiles.replace('\n','').replace('\t', '').replace('\r', ''))
p.persist_variables_to_release(__release.id)
p.handle_toggles(__release.id)
atLeastOne = True