Skip to content

Commit

Permalink
Don't hide test errors with teardown errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Feb 1, 2014
1 parent a1b2fa7 commit b17a1e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/irclog2html/tests/test_logs2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ def setUp(self):

def tearDown(self):
if self.tmpdir:
shutil.rmtree(self.tmpdir)
try:
shutil.rmtree(self.tmpdir)
except Exception, e:
sys.stderr.write(
"An error happened while cleaning up %s:\n%s: %s\n"
% (self.tmpdir, e.__class__.__name__, e))
sys.stderr.flush()

def filename(self, filename):
if self.tmpdir is None:
Expand Down

0 comments on commit b17a1e9

Please sign in to comment.