[Python-checkins] r52697 - tracker/importer/handlers.py
erik.forsberg
python-checkins at python.org
Thu Nov 9 19:28:31 CET 2006
Author: erik.forsberg
Date: Thu Nov 9 19:28:30 2006
New Revision: 52697
Modified:
tracker/importer/handlers.py
Log:
Handle deleted users.
Modified: tracker/importer/handlers.py
==============================================================================
--- tracker/importer/handlers.py (original)
+++ tracker/importer/handlers.py Thu Nov 9 19:28:30 2006
@@ -166,8 +166,14 @@
u = urllib.urlopen("http://sourceforge.net/users/" + username)
open(authorfile, 'w').write(u.fp.read())
- if -1 != open(authorfile).read().find("That user does not exist or is not yet active."):
+ authordata = open(authorfile).read()
+ if -1 != authordata.find("That user does not exist or is not yet active."):
return db.user.lookup('anonymous')
+ elif -1 != authordata.find("This user account has been deleted"):
+ ulh = UserlinkHandler(db,
+ {'username':"deleted_user_%s" % username},
+ 'username')
+ return ulh.handle()
tree = htmlload.load(authorfile)
table = tree.getiterator('table').next()
More information about the Python-checkins
mailing list