Commits

Ronny Pfannschmidt  committed 347c906

fix direct failure of the jython fixes on remote io using via

  • Participants
  • Parent commits 81890e9

Comments (0)

Files changed (2)

File execnet/gateway_bootstrap.py

     fix for jython 2.5.1
     """
     spec, io = gw.spec, gw._io
-    if spec.popen:
+    if spec.popen and not spec.via:
+        #XXX: handle the case of remote being jython
+        #     and not having the popen pid
         if io.popen.pid is None:
             io.popen.pid = gw.remote_exec(
                 "import os; channel.send(os.getpid())").receive()

File testing/test_fixes.py

 from execnet import Group
 from execnet.gateway_bootstrap import fix_pid_for_jython_popen
 
+
+def test_jython_bootstrap_not_on_remote():
+    group = Group()
+    try:
+        via = group.makegateway('popen//id=via')
+        gw = group.makegateway('popen//via=via')
+    finally:
+        group.terminate(timeout=1.0)
+
+
+
 def test_jython_bootstrap_fix():
     group = Group()
     gw = group.makegateway('popen')