Modify ↓
Opened 15 years ago
Closed 15 years ago
#6630 closed defect (fixed)
[Patch] Parameter `auth` for anonymous user is None
Reported by: | Ryan J Ollos | Owned by: | Robert Corsaro |
---|---|---|---|
Priority: | normal | Component: | FullBlogAnnouncementsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
I was seeing the following error, which appears to be because get_subscriptions_for_event
in 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.
Attachments (1)
Change History (2)
Changed 15 years ago by
Attachment: | announcerplugin.patch added |
---|
comment:1 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
(In [7686]) avoids exception on authenticated == None
fixes #6630