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

Improve cross-platform implementation #68

Merged
merged 2 commits into from
May 2, 2021

Conversation

pieterhelsen
Copy link
Collaborator

Made the following changes to fix a Pathlib bug where the log file could not be found in the event of a Windows-run chiadog connecting to a remote Linux harvester:

  • Renamed _get_remote_platform() to get_host_info() and made it static.

  • Moved get_host_info() from class initializer to create_log_consumer_from_config()

  • Replaced Path with either PosixPurePath or WindowsPurePath depending on remote host OS info

  • Added line to .gitignore to allow multi-remote testing

Also some minor updates util.py and log_consumer.py based on code formatter output

Made the following changes to fix a Pathlib bug where the log file could not be found in the event of a Windows-run chiadog connecting to a remote Linux harvester:

- Renamed `_get_remote_platform()` to `get_host_info()` and made it static.

- Moved `get_host_info()` from class initializer to `create_log_consumer_from_config()`

- Replaced `Path` with either `PosixPurePath` or `WindowsPurePath` depending on  remote host OS info

- Added line to `.gitignore` to allow multi-remote testing

Updated `util.py` (code formatter output)
Copy link
Owner

@martomi martomi left a comment

Choose a reason for hiding this comment

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

Great use of pure paths, thanks for the PR!

src/chia_log/log_consumer.py Outdated Show resolved Hide resolved
src/chia_log/log_consumer.py Outdated Show resolved Hide resolved
src/util.py Show resolved Hide resolved
src/chia_log/log_consumer.py Outdated Show resolved Hide resolved
Miscellaneous type hinting fixes
@martomi martomi merged commit ed451bf into martomi:dev May 2, 2021
jinnatar pushed a commit to jinnatar/chiadog that referenced this pull request Feb 5, 2023
Made the following changes to fix a Pathlib bug where the log file could not be found in the event of a Windows-run chiadog connecting to a remote Linux harvester:

- Renamed `_get_remote_platform()` to `get_host_info()` and made it static.
- Moved `get_host_info()` from class initializer to `create_log_consumer_from_config()`
- Replaced `Path` with either `PosixPurePath` or `WindowsPurePath` depending on  remote host OS info
- Added line to `.gitignore` to allow multi-remote testing
- Updated `util.py` (code formatter output)
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