Opened 14 years ago
Closed 14 years ago
#7329 closed defect (fixed)
spamfilter-0.3.2 fails with not enough arguments
Reported by: | Roy Marples | Owned by: | osimons |
---|---|---|---|
Priority: | high | Component: | FullBlogPlugin |
Severity: | blocker | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
It seems it now needs a fourth argument of an IP address.
Attachments (2)
Change History (4)
Changed 14 years ago by
comment:1 Changed 14 years ago by
Thanks. As I'm trying to keep the plugin code compatible with both 0.11 and 0.12, I can't quite use the patch as is. I don't have the spamfilter plugin installed myself for any version, but as the change is restricted to just the method signature, here is how I'd write it:
from trac.util import arity ... if arity(FilterSystem.test) == 4: # 0.11 compatible method signature FilterSystem(self.env).test(req, author, changes) else: # 0.12+ compatible that adds an 'ip' argument FilterSystem(self.env).test(req, author, changes, req.remote_addr) ...
The implicity argument self
is part of the argument count for the method, which makes the count 4 and 5 for old and new versions.
If the patch can be updated and confirmed to work with both 0.11 and 0.12 versions, I'll be happy to apply it.
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I've just gone ahead and applied this in [8253]. Hope it works for all. Reopen if not.
Add IP address to fix