/venus

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/venus/

« back to all changes in this revision

Viewing changes to filters/mememe.plugin

  • Committer: Jacques Distler
  • Date: 2009-01-05 02:55:13 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20090105025513-djk2unyyct87mn9x
Use hashlib instead of md5
  
Python 2.6 complains about md5.
Hashlib works for  python >= 2.5.

Show diffs side-by-side

added added

removed removed

18
18
#   sidebar = @class='sidebar'
19
19
#
20
20
 
21
 
import glob, libxml2, os, time, sys, sgmllib, urllib2, urlparse, re, md5
 
21
import glob, libxml2, os, time, sys, sgmllib, urllib2, urlparse, re, hashlib
22
22
from xml.sax.saxutils import escape
23
23
from htmlentitydefs import entitydefs
24
24
 
467
467
    tagbase = config.link().split('/')
468
468
    if not tagbase[-1]: tagbase = tagbase[:-1]
469
469
    tagbase = 'tag:%s,2007:%smeme/%%s' % (tagbase[2],'/'.join(tagbase[3:]))
470
 
    entry.newTextChild(None, 'id', tagbase % md5.new(link).hexdigest())
 
470
    entry.newTextChild(None, 'id', tagbase % hashlib.md5(link).hexdigest())
471
471
    entry.newTextChild(None, 'title', entry_title.encode('utf-8'))
472
472
    meme_link = entry.newTextChild(None, 'link', None)
473
473
    meme_link.setProp('href', link)