Starting in ReviewBoard 1.5 (Python 2.5.1 linux64 compiled
mod_python.so) the changes to use Paramiko result in this exception
when posting a review changelist (from Perforce) via the commandline
post-review tool.
HTTP POSTing to
http://sw-web3.altera.com/review/api/json/accounts/login/:
{'username': 'rromano', 'password': '**************'}
Traceback (most recent call last):
File "/tools/python/2.5.1/linux64/lib/python2.5/site-packages/
mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/tools/python/2.5.1/linux64/lib/python2.5/site-packages/
mod_python/importer.py", line 1229, in _process_target
result = _execute_target(config, req, object, arg)
File "/tools/python/2.5.1/linux64/lib/python2.5/site-packages/
mod_python/importer.py", line 1128, in _execute_target
result = object(arg)
File "/tools/django/trunk/1.2.3/django/core/handlers/modpython.py",
line 228, in handler
return ModPythonHandler()(req)
File "/tools/django/trunk/1.2.3/django/core/handlers/modpython.py",
line 191, in __call__
self.load_middleware()
File "/tools/django/trunk/1.2.3/django/core/handlers/base.py", line
40, in load_middleware
mod = import_module(mw_module)
File "/tools/django/trunk/1.2.3/django/utils/importlib.py", line 35,
in import_module
__import__(name)
File "/usr/local/altera/django/reviewboard/admin/middleware.py",
line 13, in <module>
from reviewboard.webapi.json import service_not_configured
File "/usr/local/altera/django/reviewboard/webapi/json.py", line 29,
in <module>
from reviewboard.diffviewer.forms import EmptyDiffError
File "/usr/local/altera/django/reviewboard/diffviewer/forms.py",
line 7, in <module>
from reviewboard.diffviewer.diffutils import
DEFAULT_DIFF_COMPAT_VERSION
File "/usr/local/altera/django/reviewboard/diffviewer/diffutils.py",
line 29, in <module>
from reviewboard.scmtools.core import PRE_CREATION, HEAD
File "/usr/local/altera/django/reviewboard/scmtools/core.py", line
5, in <module>
from reviewboard.scmtools import sshutils
File "/usr/local/altera/django/reviewboard/scmtools/sshutils.py",
line 5, in <module>
import paramiko
File "/usr/local/altera/django/reviewboard/paramiko/__init__.py",
line 69, in <module>
from transport import randpool, SecurityOptions, Transport
File "/usr/local/altera/django/reviewboard/paramiko/transport.py",
line 32, in <module>
from paramiko import util
File "/usr/local/altera/django/reviewboard/paramiko/util.py", line
32, in <module>
from paramiko.common import *
File "/usr/local/altera/django/reviewboard/paramiko/common.py", line
98, in <module>
from rng import StrongLockingRandomPool
File "/usr/local/altera/django/reviewboard/paramiko/rng.py", line
44, in <module>
if ((platform is not None and platform.system().lower() ==
'windows') or
File "/tools/python/2.5.1/linux64/lib/python2.5/platform.py", line
1042, in system
return uname()[0]
File "/tools/python/2.5.1/linux64/lib/python2.5/platform.py", line
1014, in uname
processor = _syscmd_uname('-p','')
File "/tools/python/2.5.1/linux64/lib/python2.5/platform.py", line
801, in _syscmd_uname
rc = f.close()
IOError: [Errno 10] No child processes
This looks very fundamental. Python's platform.uname() fn does a
subprocess call to `uname` and it's not liked.
Incidentally, under ReviewBoard 1.0.x, I had similar issues in
ReviewBoard's own code using subprocess.POpen to extract diffs from
`p4`. I simply changed the code to use os.system() and it worked fine
thereafter.
Are there known issues with the subprocess.POpen module when running
under Apache?