Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when a tmp directory is not exist #119

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

spdkimo
Copy link
Collaborator

@spdkimo spdkimo commented Jun 26, 2023

[Problem]
The error occurs and logs are printed when tmp/ is not exist;
Log file: /home/lee/ioter-main/src/common/../../tmp/230626-1708-ioter.log
Traceback (most recent call last):
File "/home/lee/ioter-main/src/main.py", line 505, in
ioter_log = init_log()
File "/home/lee/ioter-main/src/main.py", line 492, in init_log
lf = LogFile(open(log_file_name, "w").detach())
FileNotFoundError: [Errno 2] No such file or directory: '/home/lee/ioter-main/src/common/../../tmp/230626-1708-ioter.log'

[Cause]
A function creating tmp/ is not called before initializing log class

[Measure]
A position of the function has been moved

Copy link
Collaborator

@jinwon0325kim jinwon0325kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@spdkimo spdkimo merged commit 21959bc into Samsung:main Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants