def validatePaths(argsWithPaths):
"""
This function will simply validate that both paths exists
:param argsWithPaths: An input parsed object as provided by argparse.parse_args()
:return: This does not return. Simply raises ValueError in cases where paths are not valid.
"""
if not os.path.exists(argsWithPaths.p1):
raise ValueError("ERROR: file {} does not exists.".format(argsWithPaths.p1,))
if not os.path.exists(argsWithPaths.p2):
raise ValueError("ERROR: file {} does not exists.".format(argsWithPaths.p2,))
Game.py 文件源码
python
阅读 42
收藏 0
点赞 0
评论 0
评论列表
文章目录