def confirm_url(question, attrib_value):
""" This function recursively checks whether a given url is a valid
repository or not. If it isn't, it promps the user to enter a new url and
checks that.
:Arguments:
1. question (xml.etree.ElementTree.Element) = The question tag from data.xml
2. attrib_value (str) = the url to be checked
:Returns:
1. attrib_value (str) = valid url
"""
if not check_url_is_a_valid_repo(attrib_value):
attrib_value = raw_input("Please enter a valid URL: ")
attrib_value = confirm_url(question, attrib_value)
return attrib_value
interactive_warhorn.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录