fix a bug

This commit is contained in:
JerryXiao 2019-04-09 16:42:03 +08:00
parent 25aa928628
commit d4476c1a29
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA

View file

@ -72,11 +72,8 @@ def run_cmd(cmd, cwd=None, keepalive=False, KEEPALIVE_TIMEOUT=30, RUN_CMD_TIMEOU
else:
self.__file = None
def append(self, mystring):
if self.__short_return:
if super().__len__() >= 20:
super.pop(0)
super().append(mystring)
else:
if self.__short_return and super().__len__() >= 20:
super().pop(0)
super().append(mystring)
if self.__file and type(mystring) is str:
self.__file.write(mystring)