Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 6802d68

Browse files
HTony03gitee-org
authored andcommitted
memory dumps
Signed-off-by: HTony03 <[email protected]>
1 parent bc9bbcb commit 6802d68

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

loggerjava/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def log(txt, type="i", pos="main", **overrides):
7575
f.close()
7676
if debugmodein:
7777
return _formats.format(timelog, pos, level, txt)
78-
del detailtime, inconsole, debugmodein
78+
del detailtime, inconsole, debugmodein, timelog, overridename, data
7979

8080

8181
def debug(txt, pos="main", **overrides):
@@ -203,7 +203,6 @@ def config(**kwargs):
203203
tmpf = open(name + fileextension, mode="w", encoding=configname)
204204
tmpf.close()
205205
file_encoding = configname
206-
del tmpf
207206
if absolutepath:
208207
f = open(route, mode="w", encoding=file_encoding)
209208
else:
@@ -285,7 +284,7 @@ def exportconfig():
285284
export current config
286285
use loadconfig(config) to load this exported config
287286
returning as a lib
288-
:return:
287+
:return: a dictonary contains configs
289288
"""
290289
i = {"name": name, "fileextension": fileextension, "absolutepath": absolutepath,
291290
"route": route, "showdetailedtime": showdetailedtime, "showinconsole": showinconsole,
@@ -296,7 +295,7 @@ def exportconfig():
296295
def loadconfig(inputconfig):
297296
"""
298297
:param inputconfig: the config lib exported from exportconfig()
299-
:return:
298+
:return: nothing
300299
"""
301300
global name, showdetailedtime, showinconsole, absolutepath, fileextension, file_encoding, route, fatalclose
302301

@@ -317,7 +316,6 @@ def loadconfig(inputconfig):
317316
tmpf = open(name + fileextension, mode="w", encoding=inputconfig["file_encoding"])
318317
tmpf.close()
319318
file_encoding = inputconfig["file_encoding"]
320-
del tmpf
321319
except LookupError:
322320
warn("wrong file encoding config.this config is set to default", pos="main_loggerjava", showinconsole=True)
323321
file_encoding = "utf-8"

0 commit comments

Comments
 (0)