remove unittest2 and fix various warnings in py3

This commit is contained in:
Deniz Turgut 2013-04-13 16:36:05 -04:00
commit bc4bd773a0
10 changed files with 76 additions and 61 deletions

View file

@ -102,7 +102,9 @@ def wp2fields(xml):
'"BeautifulSoup4" and "lxml" required to import Wordpress XML files.')
sys.exit(error)
xmlfile = open(xml, encoding='utf-8').read()
with open(xml, encoding='utf-8') as infile:
xmlfile = infile.read()
soup = BeautifulSoup(xmlfile, "xml")
items = soup.rss.channel.findAll('item')