[py-svn] r45545 - py/trunk/py/test/rsession
fijal at codespeak.net
fijal at codespeak.net
Wed Aug 8 11:36:09 CEST 2007
Author: fijal
Date: Wed Aug 8 11:36:08 2007
New Revision: 45545
Modified:
py/trunk/py/test/rsession/reporter.py
Log:
Kill lock.
Modified: py/trunk/py/test/rsession/reporter.py
==============================================================================
--- py/trunk/py/test/rsession/reporter.py (original)
+++ py/trunk/py/test/rsession/reporter.py Wed Aug 8 11:36:08 2007
@@ -28,28 +28,23 @@
self.skipped = dict([(host, 0) for host in hosts])
self.passed = dict([(host, 0) for host in hosts])
self.to_rsync = {}
- self.lock = thread.allocate_lock()
def get_item_name(self, event, colitem):
return "/".join(colitem.listnames())
def report(self, what):
+ repfun = getattr(self, "report_" + what.__class__.__name__,
+ self.report_unknown)
try:
- self.lock.acquire()
- repfun = getattr(self, "report_" + what.__class__.__name__,
- self.report_unknown)
- try:
- return repfun(what)
- except (KeyboardInterrupt, SystemExit):
- raise
- except:
- print "Internal reporting problem"
- excinfo = py.code.ExceptionInfo()
- for i in excinfo.traceback:
- print str(i)[2:-1]
- print excinfo
- finally:
- self.lock.release()
+ return repfun(what)
+ except (KeyboardInterrupt, SystemExit):
+ raise
+ except:
+ print "Internal reporting problem"
+ excinfo = py.code.ExceptionInfo()
+ for i in excinfo.traceback:
+ print str(i)[2:-1]
+ print excinfo
def report_unknown(self, what):
if self.config.option.verbose:
More information about the pytest-commit
mailing list