摘要: class retry(object): """A retry decorator.""" def __init__(self, exception=Exception, timeout=None, retries=None, interval=0.001, logfun=lambda s: pri 阅读全文
posted @ 2018-11-15 00:14 姚果果 阅读(155) 评论(0) 推荐(0) 编辑
摘要: def sh(cmd, **kwds): """run cmd in a subprocess and return its output. raises RuntimeError on error. """ shell = True if isinstance(cmd, (str, unicode 阅读全文
posted @ 2018-11-15 00:12 姚果果 阅读(1197) 评论(0) 推荐(0) 编辑