-
Notifications
You must be signed in to change notification settings - Fork 70
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 daemon and python 3.7 issues v2 #151
Fix daemon and python 3.7 issues v2 #151
Conversation
The indentation was wrong, causing the daemon to only process the last block of outout, which would only show up with a lot of output.
We can no longer have python automatically convert binary to/from string data, so be explicit about it. Also, the TargetCLI __del__ method was testing for a non-existant attribute, so close our socket if open.
Add Documentation entries, cleaned up socket activation entries.
There's no need to return a zero-length string. Before being fixed, this caused a hang when shutting down.
Save the error exit for unknown exits. This makes systemd happier, since it stops us with a signal.
This allows the main loop to get an exception in its wait loop when a signal arrives, rather than block forever. Before this, topping the daemon required sending a KILL signal or sending one last command, so that the loop could check the "received a signal" flag.
Regular socket communications are fallen back to when no systemd socket is present.
Before, we would get a "Bad File Descriptor" message when a signal causes closure of the socket while waiting on a socket message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving very minor findings below.
Tested it on fedora 30, it works well for me.
Overall the PR looks good to me.
Thanks @gonzoleeman
Would you like me to fix the spelling errors in an additional commit? |
This is not important, for projects which I maintain, I generally fix it while merging, avoiding the need to respin for the author/contributor :-) Or IMHO, we can fix it later when we come across that part of code in our future PR's. Thanks! |
Looks good to me, thanks @gonzoleeman |
I believe this pull request fixes all issues raised in the first version: