修复当有函数使用全局DrissionPage对象,在自动关闭时出现的异常

This commit is contained in:
g1879 2020-05-28 19:32:36 +08:00
parent cbc07a6554
commit d6465c412d

View File

@ -173,4 +173,7 @@ class Drission(object):
self.close_session() self.close_session()
def __del__(self): def __del__(self):
self.close() try:
self.close()
except ImportError:
pass