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

Commit 8914ce3

Browse files
author
9FS
committed
added "if __name__=="__main__":" guard
1 parent 160e0a2 commit 8914ce3

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "MIT"
55
name = "x" # can't leave empty because of bug with `poetry install` from poetry.lock file
66
readme = "readme.md"
77
repository = "https://github.com/9-FS/2021-12-22-Filename-Dateformat-Changer"
8-
version = "1.1.0"
8+
version = "1.1.1"
99

1010
[tool.poetry.dependencies]
1111
kfsconfig = "^1.0.0"

src/main_outer.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# Copyright (c) 2023 구FS, all rights reserved. Subject to the MIT licence in `licence.md`.
2-
from KFSlog import KFSlog
3-
import logging
4-
import traceback
5-
from main import main
2+
if __name__=="__main__":
3+
from KFSlog import KFSlog
4+
import logging
5+
import traceback
6+
from main import main
67

78

8-
KFSlog.setup_logging("", logging.INFO)
9-
#KFSlog.setup_logging("", logging.DEBUG, filepath_format="./log/%Y-%m-%dT%H_%M.log", rotate_filepath_when="M")
9+
KFSlog.setup_logging("", logging.INFO)
10+
#KFSlog.setup_logging("", logging.DEBUG, filepath_format="./log/%Y-%m-%dT%H_%M.log", rotate_filepath_when="M")
1011

11-
try:
12-
main()
13-
except:
14-
logging.critical(traceback.format_exc())
15-
print("\nPress enter to close program.", flush=True)
16-
input() # pause
12+
try:
13+
main()
14+
except:
15+
logging.critical(traceback.format_exc())
16+
print("\nPress enter to close program.", flush=True)
17+
input() # pause

0 commit comments

Comments
 (0)