-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fixed #37: Prevent crash setting up dbus without a notification target #41
Conversation
Hi Adam, First of all thanks a lot for porting your fixes and refiling the merge request, your help is very much appreciated. Next is the procedure, I don't really see why there are two separate commits instead of a single commit. The second commit is too small and the first commit can't function on it's own. If you could rebase your commit to squash them together then that would be great. Lastly the technical details of the fix. It works well as a static fix when you're starting up Clay but it doesn't take in account that the notification daemon might crash during usage (e.x. closing your wm with clay running in a multiplexer) or that a notification starts up again later. Hence utilizing the watch_name dbus functionality instead might be a better way of doing things (pydbus doc link & gnome developer doc link) |
1d14266
to
594e527
Compare
I agree entirely with your comments. You're the first person I've met who actually cares more about commit structure than I do. I don't know much about Dbus, but I believe I got the detection working successfully. I sheepishly admit that I could not come up with some way to test the closing functionality however, so there may still be issues. |
Hi Adam, The commit history is perfect now. I took a look at code and there are a few things that require some improvement. For instance in the _notify function you check whether the It crashes if notification server exists when it starts but exits when it closes, wrapping the If the notification server doesn't exist when you start it but gets created later it will not send notifications. I don't think that adding BASE_NAME is needed in the There are also a few style issues:
I would recommend that you install a linter and add it to your text editor. It really helps a lot guarding you against these issues. EDIT: To test it, I just SIGKILL my notification server and start it up again. Here is a list of standalone servers you can use. |
d5fb296
to
3b91f04
Compare
594e527
to
12ca823
Compare
I'm fairly certain
The docstring for All of the linting stuff should be fixed, so let me know if you have further comments |
12ca823
to
7c0c784
Compare
I just rechecked it again and you're right. The reason I thought it wasn't required was because it seemed to work fine on most of the tests that I ran, turns out the only time it doesn't work that way is when you don't have notification server started and then start one. So my bad, sorry. The style stuff seems to be perfectly fine. The last two things minor nitpicky things are that you should probably log the exception in So fix those three things and I'll merge it. Again, thanks for your contribution. |
7c0c784
to
ec26bb8
Compare
Done |
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.
You forgot to re-add the BASE_NAME to watch_name, that is it.
ec26bb8
to
2cb9823
Compare
Man, can't catch break :P I must say, I'm not liking how poorly editors seem to calculate type information (though I am quite unused to Python in general). What does your environment look like? |
Making mistakes is only human after all right? Also, I feel like discussing my text editor configuration is a bit too off-topic for this pull request. If you want to talk about that you're better off sending a message on the IRC channel. |
Let's try this again.
Fixed #37: Prevent crash setting up dbus without a notification target