def GetVersionObject():
"""Gets the version of the SDK by parsing the VERSION file.
Returns:
A Yaml object or None if the VERSION file does not exist.
"""
version_filename = os.path.join(os.path.dirname(google.appengine.__file__),
VERSION_FILE)
try:
version_fh = open(version_filename)
except IOError:
logging.error('Could not find version file at %s', version_filename)
return None
try:
version = yaml.safe_load(version_fh)
finally:
version_fh.close()
return version
sdk_update_checker.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录