vscode debug AttributeError: 'NoneType' object has no attribute

This commit is contained in:
lededev
2022-03-03 06:44:38 +08:00
parent 9e332b0d02
commit 6ffdf08bc8

View File

@@ -113,9 +113,12 @@ class OutLogger(object):
self.log.write(msg)
def flush(self):
self.term.flush()
self.log.flush()
os.fsync(self.log.fileno())
if 'flush' in dir(self.term):
self.term.flush()
if 'flush' in dir(self.log):
self.log.flush()
if 'fileno' in dir(self.log):
os.fsync(self.log.fileno())
def close(self):
if self.term is not None: