Skip to content

Conversation

@pinpang
Copy link
Contributor

@pinpang pinpang commented Feb 16, 2022

Move the log file from the module installation directory to the user HOME directory.

Copy link
Owner

@drohm drohm left a comment

Choose a reason for hiding this comment

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

Can you take a look at my two comments on the pi_sht1x/logging.py file? If you can fix those I'll get this merged and do another release. Apologies for the delay getting back to this.

@@ -1,9 +1,10 @@
from os import path
import os
Copy link
Owner

Choose a reason for hiding this comment

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

I'd prefer to use the previous import to scope the import to path, which is all we need here.

"""
logger = getLogger(name)
log_filename = path.join(path.dirname(path.realpath(__file__)), LOG_FILE_NAME)
log_filename = os.path.join(_get_log_folder(), LOG_FILE_NAME)
Copy link
Owner

Choose a reason for hiding this comment

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

If you change the import above you can change this to path.join.

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