traceback for _thread.WorkerPool.__init__

/home/johnny/projects/merlinux/py/dist/py/execnet/gateway.py:39

   def __init__(self, io, startcount=2, maxthreads=None):
       global registered_cleanup
->     self._execpool = WorkerPool() 
   ##        self.running = True 
       self.io = io
       self._outgoing = Queue.Queue()
       self.channelfactory = ChannelFactory(self, startcount)
   ##        self._exitlock = threading.Lock()
       if not registered_cleanup:
           atexit.register(cleanup_atexit)
           registered_cleanup = True
       _active_sendqueues[self._outgoing] = True
       self.pool = NamedThreadPool(receiver = self.thread_receiver, 
                                   sender = self.thread_sender)

/home/johnny/projects/merlinux/py/dist/py/execnet/register.py:33

   def __init__(self, io):
       self.remote_bootstrap_gateway(io)
->     super(InstallableGateway, self).__init__(io=io, startcount=1)

/home/johnny/projects/merlinux/py/dist/py/execnet/register.py:54

   def __init__(self, cmd):
       infile, outfile = os.popen2(cmd)
       io = inputoutput.Popen2IO(infile, outfile)
->     super(PopenCmdGateway, self).__init__(io=io)

/home/johnny/projects/merlinux/py/dist/py/test/rsession/hostmanage.py:44

   def prepare_gateway(sshosts, relpath, rsync_roots, optimise_localhost, 
       remote_python, pkgdir, real_create=True):
       hosts = []
       for num, host in enumerate(sshosts):
           if host != 'localhost' or not optimise_localhost:
               if isinstance(relpath, str):
                   assert not os.path.isabs(relpath), relpath
                   remoterootpath = relpath
               else:
                   remoterootpath = relpath[(num, host)]
               # XXX: because of NFS we do create different directories
               #      otherwise, .pyc files overlap
               remoterootpath += "-" + host
               if real_create:
                   # for tests we want to use somtehing different
                   if host == 'localhost' and optimise_localhost is False:
                       from py.__.execnet.register import PopenCmdGateway
->                     gw = PopenCmdGateway("cd ~; python -u -c 'exec input()'")
                       if not remoterootpath.startswith("/"):
                           remoteroopath = os.environ['HOME'] + '/' + remoterootpath
                   else:
                       if remote_python is None:
                           gw = py.execnet.SshGateway(host)
                       else:
                           gw = py.execnet.SshGateway(host, remotepython=remote_python)
                   gw.hostid = host + str(num)
               else:
                   gw = None
               hosts.append((num, host, gw, remoterootpath))
           else:
               if remote_python is None:
                   gw = py.execnet.PopenGateway()
               else:
                   gw = py.execnet.PopenGateway(remotepython=remote_python)
               gw.hostid = 'localhost' + str(num)
               gw.sshaddress = 'localhost'
               hosts.append((num, host, gw, str(pkgdir.dirpath())))
       return hosts

/home/johnny/projects/merlinux/py/dist/py/test/rsession/hostmanage.py:76

   def init_hosts(reporter, sshhosts, relpath, pkgdir, rsync_roots=None, \
                  remote_python=None, remote_options={}, optimise_localhost=True,\
                  do_sync=True):
       assert pkgdir.join("__init__.py").check(), (
               "%s probably wrong" %(pkgdir,))
       assert relpath, relpath
       
       exc_info = [None]
       hosts = prepare_gateway(sshhosts, relpath, rsync_roots, optimise_localhost,
->         remote_python, pkgdir, real_create=do_sync)
       
       # rsyncing
       rsynced = {}
   
       if do_sync:
           rsync = HostRSync(rsync_roots)
       for num, host, gw, remoterootpath in hosts:
           if (host, remoterootpath) in rsynced or (host == 'localhost' \
               and optimise_localhost):
               key = host + str(num)
               reporter(report.HostReady(host, key))
               continue
           rsynced[(host, remoterootpath)] = True
           def done(host=host, num=num):
               key = host + str(num)
               reporter(report.HostReady(host, key))
           reporter(report.HostRSyncing(host, remoterootpath))
           if do_sync:
               rsync.add_target(gw, remoterootpath, done)
       if not do_sync:
           return # for testing only
       rsync.send(pkgdir.dirpath())
   
       # hosts ready
       return setup_nodes(hosts, pkgdir, remote_options, reporter)

/home/johnny/projects/merlinux/py/dist/py/test/rsession/testing/test_rsession.py:262

   def test_config_pass(self):
       """ Tests options object passing master -> server
           """
       allevents = []
       hosts = ['localhost']
       config, args = py.test.Config.parse([])
       session_options.bind_config(config)
       d = remote_options.d.copy()
       d['custom'] = 'custom'
       nodes = init_hosts(allevents.append, hosts, 'pytesttest', pkgdir, 
           rsync_roots=["py"], remote_options=d,
->         optimise_localhost=False)
           
       rootcol = py.test.collect.Directory(pkgdir.dirpath())
       itempass = rootcol.getitembynames(funcoption_spec)
       itempassaswell = rootcol.getitembynames(funcoptioncustom_spec)
           
       for node in nodes:
           node.send(itempass)
           node.send(itempassaswell)
           
       teardown_hosts(allevents.append, [node.channel for node in nodes], nodes)
       events = [i for i in allevents 
                       if isinstance(i, report.ReceivedItemOutcome)]
       passed = [i for i in events 
                       if i.outcome.passed]
       skipped = [i for i in events 
                       if i.outcome.skipped]
       assert len(passed) == 2 * len(nodes)
       assert len(skipped) == 0
       assert len(events) == len(passed)

/home/johnny/projects/merlinux/py/dist/py/test/item.py:79

   def execute(self, target, *args):
       """ default implementation for calling a test target is to
               simply call it.
           """
->     target(*args)

/home/johnny/projects/merlinux/py/dist/py/test/item.py:73

   def run(self):
       self.state.prepare(self) 
->     self.execute(self.obj, *self.args)

/home/johnny/projects/merlinux/py/dist/py/test/rsession/executor.py:22

   def execute(self):
       try:
->         self.item.run()
           outcome = Outcome()
       except py.test.Item.Skipped, e: 
           outcome = Outcome(skipped=str(e))
       except (KeyboardInterrupt, SystemExit):
           raise
       except:
           excinfo = py.code.ExceptionInfo()
           if isinstance(self.item, py.test.Function): 
               fun = self.item.obj # hope this is stable 
               code = py.code.Code(fun)
               excinfo.traceback = excinfo.traceback.cut(
                       path=code.path, firstlineno=code.firstlineno)
           outcome = Outcome(excinfo=excinfo, setupfailure=False)
           if self.usepdb:
               if self.reporter is not None:
                   self.reporter(report.ImmediateFailure(self.item,
                       ReprOutcome(outcome.make_repr())))
               import pdb
               pdb.post_mortem(excinfo._excinfo[2])
               # XXX hmm, we probably will not like to continue from that point
               # or we do?
               raise SystemExit()
       outcome.stdout = ""
       outcome.stderr = ""
       return outcome

/home/johnny/projects/merlinux/py/dist/py/test/rsession/local.py:31

   def plain_runner(item, session, reporter):
       # box executor is doing stdout/err catching for us, let's do it here
       startcapture(session)
       r = RunExecutor(item, usepdb=session.config.option.usepdb, reporter=reporter)
->     outcome = r.execute()
       outcome = ReprOutcome(outcome.make_repr())
       outcome.stdout, outcome.stderr = finishcapture(session)
       return outcome

/home/johnny/projects/merlinux/py/dist/py/test/rsession/local.py:47

   def apigen_runner(item, session, reporter):
       r = RunExecutor(item, reporter=reporter)
       session.tracer.start_tracing()
->     retval = plain_runner(item, session, reporter)
       session.tracer.end_tracing()
       return retval