[Patch] Parameter `auth` for anonymous user is None
|Reported by:||Ryan J Ollos||Owned by:||Robert Corsaro|
I was seeing the following error, which appears to be because
subscriber.py returns None for an anonymous user, rather than 0.
It seemed like it might be better to fix this in the announcerplugin, so I patched it there for now, and will refer to your expertise as to the best fix.
09:12:44 PM Trac[model] DEBUG: Saving new version 6 of blog post u'Post1' from author 'anonymous' 09:12:45 PM Trac[api] DEBUG: AnnouncementSystem found the following subscribers capable of handling 'blog, post changed': BlogSubscriber 09:12:45 PM Trac[subscriber] DEBUG: BlogSubscriber added 'anonymous (None)' for 'My Post Subscription' 09:12:45 PM Trac[api] DEBUG: AnnouncementSystem has found the following subscriptions: [anonymous(not authenticated) via email] 09:12:45 PM Trac[email_distributor] DEBUG: EmailDistributor has found the following formats capable of handling 'email' of 'blog': text/plain 09:12:45 PM Trac[api] ERROR: AnnouncementSystem failed. Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/announcerplugin/api.py", line 369, in _real_send distributor.distribute(transport, packages[transport], evt) File "build/bdist.linux-x86_64/egg/announcerplugin/distributors/email_distributor.py", line 192, in distribute self._get_preferred_format(event.realm, name, authed) or \ File "build/bdist.linux-x86_64/egg/announcerplugin/distributors/email_distributor.py", line 250, in _get_preferred_format """, (sid, int(authenticated), 'announcer_email_format_%s' % realm)) TypeError: int() argument must be a string or a number, not 'NoneType' 09:12:45 PM Trac[api] DEBUG: AnnouncementSystem sent event in 0.01 seconds.