Merge pull request #842 from avaris/remove-unittest2

remove unittest2 and fix various warnings in py3
This commit is contained in:
Justin Mayer 2013-04-13 14:23:38 -07:00
commit 87735b5215
10 changed files with 75 additions and 66 deletions

View file

@ -106,7 +106,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')