[py-svn] r38091 - py/trunk/py/test/rsession
fijal at codespeak.net
fijal at codespeak.net
Wed Feb 7 19:25:03 CET 2007
Author: fijal
Date: Wed Feb 7 19:25:01 2007
New Revision: 38091
Modified:
py/trunk/py/test/rsession/master.py
Log:
Increase verbosity in case of error. The thing is that we usually don't get
remote error, so let's print it.
Modified: py/trunk/py/test/rsession/master.py
==============================================================================
--- py/trunk/py/test/rsession/master.py (original)
+++ py/trunk/py/test/rsession/master.py Wed Feb 7 19:25:01 2007
@@ -23,14 +23,27 @@
self.channel, item, repr_outcome))
def send(self, item):
- if item is StopIteration:
- self.channel.send(42)
- else:
- self.pending.insert(0, item)
+ try:
+ if item is StopIteration:
+ self.channel.send(42)
+ else:
+ self.pending.insert(0, item)
#itemspec = item.listnames()[1:]
- self.channel.send(item._get_collector_trail())
- # send start report
- self.reporter(repevent.SendItem(self.channel, item))
+ self.channel.send(item._get_collector_trail())
+ # send start report
+ self.reporter(repevent.SendItem(self.channel, item))
+ except IOError:
+
+ try:
+ channel._getremoterror()
+ except:
+ # if this were not remote, we've got no clue
+ excinfo = py.code.ExceptionInfo()
+ for i in excinfo.traceback:
+ print str(i)[2:-1]
+ print excinfo
+ else:
+ raise
def itemgen(colitems, reporter, keyword, reporterror):
def rep(x):
More information about the py-svn
mailing list