Re: comments.py patch

Lance Levsen <lance-8fVGZEMlguYsA/[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
Hey Michael,

Michael Guntsche wrote:
> On Thu, 15 Nov 2007 22:29:39 -0600, Lance Levsen <lance-8fVGZEMlguYsA/[email protected]> wrote:
>> Trunk calls entry['file_url_encoded'], needs to be entry['file_url'].
>> unified diff attached.
> 
> We should use tools.urlencode_text(...) for this, since we really want to
> have an urlencoded entry here. This should work both in 1.4.x and current
> HEAD. 

I agree, but it isn't working.

2007-11-15 22:16:41,457 [ERROR] comments: error sending email:
['Traceback (most recent call last):\n', '  File
"/etc/pyblosxom/plugins_1.4 /comments.py", line 516, in send_email\n
curl = config[\'base_url\']+\'/\'+entry[\'file_path_urlencoded\']\n',
"TypeError: cannot concatenate 'str' and 'NoneType' objects\n"]

The entry dictionary doesn't have a file_path_urlencoded key. Here's the
log with a logger.error("Base URL: %s" % entry['base_url']) and a
logger.error(entry.keys):

2007-11-15 22:18:26,733 [ERROR] comments: Base URL:
http://www.catprint.ca/blog/blog
2007-11-15 22:18:26,734 [ERROR] comments: ['urlencode', 'ti', 'yr',
'mo', 'mo_num', 'rfc822date', 'title', 'absolute_path', 'mtime',
'filename', 'date', 'tb_id', 'fulltime', 'timetuple', 'escape', 'dw',
'path', 'w3cdate', 'da', 'file_path', 'fn', 'body']

Cheers,
lance

-- 
Lance Levsen,
Catprint Computing
Tel:  (306) 493-2249
Cell: (306) 230-8783
Blog: http://www.catprint.ca/blog/
SaskBlogs: http://saskblogs.catprint.ca/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Pyblosxom-devel mailing list
Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel
signature.asc (application/pgp-signature, 252 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHPbd1WSOc2vLaecgRAkfYAJ9n85943E5KRhrXBpOsGnOvcyv8ZQCgnsY2
KMvqPlbTPqzCZKTGPiQX3ok=
=SGha
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.