[Tracker-discuss] SPAMBAYES_URI (Was: Call for volunteers to help maintain bugs.python.org's issue tracker)
skip at pobox.com
skip at pobox.com
Sat Feb 23 23:22:59 CET 2008
Martin> If you comment out spambayes_uri, you get a roundup error saying
Martin> Edit Error: Unsupported configuration option: SPAMBAYES_URI
in instances/spambayes_integration/detectors/spambayes.py you should
probably change the dict access from
spambayes_uri = db.config.detectors['SPAMBAYES_URI']
to something like
try:
spambayes_uri = db.config.detectors['SPAMBAYES_URI']
except KeyError, e:
return (False, str(e))
though I'm not sure just what kind of object db.config.detectors is.
Hopefully it raises KeyError, but it might raise something else.
Martin> If you set it to an empty string, you get
Martin> IOError: unsupported XML-RPC protocol
If you want the empty string to be a valid value for spambayes_uri, then
change the ServerProxy() call from
server = xmlrpclib.ServerProxy(spambayes_uri, verbose=False)
to
try:
server = xmlrpclib.ServerProxy(spambayes_uri, verbose=False)
except IOError, e:
return (False, str(e))
Skip
More information about the Tracker-discuss
mailing list