Skip to content
This repository has been archived by the owner on Mar 8, 2018. It is now read-only.

Commit

Permalink
Update xmlrunner.py for Python 3.1 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
R. Tyler Ballance committed Feb 21, 2010
1 parent 454db0f commit e8f702e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/xmlrunner.py
Expand Up @@ -13,11 +13,12 @@
import time
import traceback
import unittest
from StringIO import StringIO
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
from xml.sax.saxutils import escape

from StringIO import StringIO



class _TestInfo(object):
Expand Down Expand Up @@ -171,7 +172,7 @@ def run(self, test):
filename = "TEST-%s.xml" % classname
if self._filename:
filename = self._filename
stream = file(os.path.join(self._path, filename), "w")
stream = open(os.path.join(self._path, filename), "w")
stream.write('<?xml version="1.0" encoding="utf-8"?>\n')
else:
stream = self._stream
Expand Down

0 comments on commit e8f702e

Please sign in to comment.