@@ -75,7 +75,7 @@ def log(txt, type="i", pos="main", **overrides):
75
75
f .close ()
76
76
if debugmodein :
77
77
return _formats .format (timelog , pos , level , txt )
78
- del detailtime , inconsole , debugmodein
78
+ del detailtime , inconsole , debugmodein , timelog , overridename , data
79
79
80
80
81
81
def debug (txt , pos = "main" , ** overrides ):
@@ -203,7 +203,6 @@ def config(**kwargs):
203
203
tmpf = open (name + fileextension , mode = "w" , encoding = configname )
204
204
tmpf .close ()
205
205
file_encoding = configname
206
- del tmpf
207
206
if absolutepath :
208
207
f = open (route , mode = "w" , encoding = file_encoding )
209
208
else :
@@ -285,7 +284,7 @@ def exportconfig():
285
284
export current config
286
285
use loadconfig(config) to load this exported config
287
286
returning as a lib
288
- :return:
287
+ :return: a dictonary contains configs
289
288
"""
290
289
i = {"name" : name , "fileextension" : fileextension , "absolutepath" : absolutepath ,
291
290
"route" : route , "showdetailedtime" : showdetailedtime , "showinconsole" : showinconsole ,
@@ -296,7 +295,7 @@ def exportconfig():
296
295
def loadconfig (inputconfig ):
297
296
"""
298
297
:param inputconfig: the config lib exported from exportconfig()
299
- :return:
298
+ :return: nothing
300
299
"""
301
300
global name , showdetailedtime , showinconsole , absolutepath , fileextension , file_encoding , route , fatalclose
302
301
@@ -317,7 +316,6 @@ def loadconfig(inputconfig):
317
316
tmpf = open (name + fileextension , mode = "w" , encoding = inputconfig ["file_encoding" ])
318
317
tmpf .close ()
319
318
file_encoding = inputconfig ["file_encoding" ]
320
- del tmpf
321
319
except LookupError :
322
320
warn ("wrong file encoding config.this config is set to default" , pos = "main_loggerjava" , showinconsole = True )
323
321
file_encoding = "utf-8"
0 commit comments