Re: PATCH: Growl.py: setting a list of notifications in GrowlNotifier.__init__ doesn't work

20 views
Skip to first unread message

Guy Bolton King

unread,
Jun 18, 2009, 4:12:24 AM6/18/09
to Growl Discuss
Hi,

Sorry to raise this again: I've already sent this patch in for 1.1.4,
and I note the problem persists in 1.1.5: am I calling GrowlNotifier
incorrectly, or is this a bug that the patch fixes?

Here's my original post from 15th April:

It's possible I'm calling GrowlNotifier() the wrong way, however,
this:
from Growl import GrowlNotifier
growl = GrowlNotifier(applicationName='redmine-to-omnifocus',
notifications=['changed', 'completed'],
hostname='localhost',
password='')
growl.register()
...fails at the growl.register() call with the following stacktrace:
[...]
File "Growl.py", line 102, in encodeRegistration
struct.error: required argument is not an integer
The attached patch appears to fix things.
Regards,
Guy.
---snip---
--- Growl.py.orig 2009-04-15 10:07:01.000000000 +0100
+++ Growl.py 2009-04-15 10:07:05.000000000 +0100
@@ -99,6 +99,8 @@
data += struct.pack("!H", len(encoded))
data += encoded
for i in defaultNotifications:
+ if type(i) != int:
+ i = notifications.index(i)
data += struct.pack("B", i)
return self.encodePassword(data)

Justin

unread,
Mar 2, 2012, 4:46:32 PM3/2/12
to growld...@googlegroups.com
I have been having this problem for the past 2 hours, came to the same discovery, and looked through all the branches on http://growl.info/hg/growl/ to make sure I wasn't somehow on a broken version...

My question is... How has this bug never been fixed back from 2009 where you were experiencing it? And, how has this worked for anyone in the first place if they didn't explicitly set defaultNotifications to a list of indexes (if they didn't actually try to fix the source themselves)?

Chris Forsythe

unread,
Mar 3, 2012, 1:43:32 AM3/3/12
to growld...@googlegroups.com
We dropped a large amount of bindings when 1.3 was released since the GNTP equivalents were better maintained by other groups. Unless you're talking about something else, but I don't see anything in the 1.3.3 tag:


-- 
Chris Forsythe

--
You received this message because you are subscribed to the Google Groups "Growl Discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/growldiscuss/-/2EcUoyMKW0IJ.
To post to this group, send email to growld...@googlegroups.com.
To unsubscribe from this group, send email to growldiscuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/growldiscuss?hl=en.

Justin Israel

unread,
Mar 3, 2012, 2:15:38 AM3/3/12
to growld...@googlegroups.com, growld...@googlegroups.com
I think this may just be a situation of me not understanding that the python bindings were dropped a long time ago and never fully patched and stable. My facility is on a growl 1.2.2 install and the python bindings look to be 0.7. 
I was using the bindings perfectly with local notifications until I just tried to use netgrowl and saw the bug. Then I saw that they had been removed from 1.3 and this is the last available version.  

Chris Forsythe

unread,
Mar 3, 2012, 1:57:25 PM3/3/12
to growld...@googlegroups.com
When your facility looks to move to 1.3 (or really 1.4 at this point, it has a lot of networking improvements) you'll likely want to look at http://growl.info/documentation/developer/bindings.php . We found that others were maintaining bindings a lot better than we could, so we decided that letting them do what they are good at and letting us do what we are good at would be the best bet. :)

-- 
Chris Forsythe

Reply all
Reply to author
Forward
0 new messages