def single_stat_check(args, filename):
try:
with open(args.container + "/" + filename, "r") as f:
stat = f.read().strip()
except Exception, e:
if not os.path.isdir(args.container):
os.mkdir(args.container)
# first time running for this container, bootstrap with empty zero
stat = "0"
f = open(args.container + "/" + filename,"w")
f.write(str(stat) + '\n')
f.close()
return stat
# helper function to update single stats
discover.py 文件源码
python
阅读 38
收藏 0
点赞 0
评论 0
评论列表
文章目录