Chris,

my fault - I'm new to the web interface to Google Groups, and I
assumed it wouldn't fold the lines.

http://groups.google.com/group/growldiscuss/web/growl-py.patch?hl=en

On Mar 16, 7:57 pm, Christopher Forsythe <[email protected]> wrote:
> Can you attach the patch as a file, or post it to the files section? Thanks
> for contributing!
>
> Chris
>
> On Mon, Mar 16, 2009 at 6:51 PM, Charles Lepple <[email protected]> wrote:
>
> > Python 2.6 points out that two of the asserts in Growl.py will always
> > evaluate to be True, e.g.
>
> >    assert(self.applicationName, 'An application name is required.')
>
> > One could argue that the first assert below is superfluous
> > (self.ApplicationName has a default, so it will not be None unless
> > someone hacks up the code), but once patched, the second assert does
> > catch an empty notification list.
>
> > The following is a small patch which simply removes the parentheses:
>
> > diff -Naur growl-python-1.1.4.orig/Growl.py growl-python-1.1.4/
> > Growl.py
> > --- growl-python-1.1.4.orig/Growl.py    2007-09-20 12:53:34.000000000
> > -0400
> > +++ growl-python-1.1.4/Growl.py 2009-03-16 19:07:40.000000000 -0400
> > @@ -173,11 +173,11 @@
> >        def __init__(self, applicationName=None, notifications=None,
> > defaultNotifications=None, applicationIcon=None, hostname=None,
> > password=None):
> >                if applicationName:
> >                        self.applicationName = applicationName
> > -               assert(self.applicationName, 'An application name is
> > required.')
> > +               assert self.applicationName, 'An application name is
> > required.'
>
> >                if notifications:
> >                        self.notifications = list(notifications)
> > -               assert(self.notifications, 'A sequence of one or more
> > notification names is required.')
> > +               assert self.notifications, 'A sequence of one or more
> > notification names is required.'
>
> >                if defaultNotifications is not None:
> >                        self.defaultNotifications = list
> > (defaultNotifications)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Growl Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/growldiscuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to