file -> open for python 3 compat

This commit is contained in:
Benjamin Peterson 2017-02-26 11:11:00 -08:00
parent 73e6ac628e
commit 0bb8e3999f
1 changed files with 2 additions and 1 deletions

View File

@ -69,4 +69,5 @@ rss = rssgen.RSS2(
lastBuildDate = datetime.datetime.now(),
items = items)
file(RSS_PATH, 'w').write(rss.to_xml())
with open(RSS_PATH, 'w') as fp:
fp.write(rss.to_xml())