~ubuntu-branches/ubuntu/intrepid/moin/intrepid-updates

« back to all changes in this revision

Viewing changes to MoinMoin/util/antispam.py

  • Committer: Bazaar Package Importer
  • Author(s): Sivan Greenberg
  • Date: 2006-07-09 19:28:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060709192802-oaeuvt4v3e9300uj
Tags: 1.5.3-1ubuntu1
* Merge new debian version.
* Reapply Ubuntu changes:
    + debian/rules:
      - Comment out usage of control.ubuntu.in (doesn't fit!).
    + debian/control.in:
      - Dropped python2.3 binary package.
    + debian/control:
      - Dropped python2.3 binary, again.
      - Dropped python2.3-dev from Build-Depends-Indep.
    + debian/patches/001-attachment-xss-fix.patch:
      - Dropped this patch. It's now in upstream's distribution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# give some log entries to stderr
14
14
debug = 1
15
15
 
16
 
import re, sys, time
 
16
import re, sys, time, datetime
17
17
import sets
18
18
 
19
19
if __name__ == '__main__':
108
108
                
109
109
                # Compare date against local BadContent copy
110
110
                masterdate = response['lastModified']
111
 
                mydate = xmlrpclib.DateTime(tuple(time.gmtime(mymtime)))
 
111
 
 
112
                if isinstance(masterdate, datetime.datetime): 
 
113
                    # for python 2.5a
 
114
                    mydate = datetime.datetime(*tuple(time.gmtime(mymtime))[0:6])
 
115
                else:
 
116
                    # for python <= 2.4.x
 
117
                    mydate = xmlrpclib.DateTime(tuple(time.gmtime(mymtime)))
 
118
                                                    
112
119
                dprint("master: %s mine: %s" % (masterdate, mydate))
113
120
                if mydate < masterdate:
114
121
                    # Get new copy and save
210
217
    """
211
218
    import urllib
212
219
    mtbl = urllib.urlopen("http://www.jayallen.org/comment_spam/blacklist.txt").read()
213
 
    mmbl = urllib.urlopen("http://moinmaster.wikiwikiweb.de:8000/BadContent?action=raw").read()
 
220
    mmbl = urllib.urlopen("http://moinmaster.wikiwikiweb.de/BadContent?action=raw").read()
214
221
    mtbl = makelist(mtbl)
215
222
    mmbl = makelist(mmbl)
216
223
    print "#format plain"