提交 52642681 编写于 作者: S superjom

fix reader

上级 c8a1bd65
......@@ -16,8 +16,8 @@ class LogReader(object):
self.reader = reader if reader else core.LogReader(dir)
def mode(self, mode):
LogReader.cur_mode = self.as_mode(mode)
return LogReader.cur_mode
self.reader.set_mode(mode)
return self
def as_mode(self, mode):
tmp = LogReader(dir, self.reader.as_mode(mode))
......@@ -41,10 +41,10 @@ class LogReader(object):
return self.reader.get_image(tag)
def __enter__(self):
return LogReader.cur_mode
return self
def __exit__(self, type, value, traceback):
pass
self.reader.set_mode("default")
class LogWriter(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册