saga-project / bliss

ATTENTION: bliss is now saga-python. Please check out the new project website for the latest version: http://saga-project.github.com/saga-python/
http://saga-project.github.com/saga-python/
Other
8 stars 4 forks source link

SSH Job plug-in fail ifs stdout/stderr are not set? #54

Closed andre-merzky closed 12 years ago

andre-merzky commented 12 years ago

example::

merzky@thinkie:~/saga/bliss (master *%) $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bliss.saga as saga
/usr/local/lib/python2.6/dist-packages/pycrypto_on_pypi-2.3-py2.6-linux-x86_64.egg/Crypto/Util/randpool.py:40: RandomPool_DeprecationWarning: This application u  es RandomPool, which is BROKEN in older releases.  See http://www.pycrypto.org/randpool-broken
  RandomPool_DeprecationWarning)

>>> jd = saga.job.Description()
>>> jd.executable  = '/bin/date'
>>> jd.arguments   = ['-R', '-d', 'now']
>>> jd.environment = {'TZ' : 'EST'}
>>> js = saga.job.Service('ssh://localhost')
>>> j  = js.create_job(jd)
>>> j.run()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bliss/saga/job/Job.py", line 298, in run
    return self._plugin.job_run(self)
  File "bliss/plugins/ssh/job.py", line 206, in job_run
    self.log_error_and_raise(bliss.saga.Error.NoSuccess, "Couldn't run job because: %s " % (str(ex)))
  File "bliss/interface/pluginbase.py", line 37, in log_error_and_raise
    raise SAGAException(error, msg)
bliss.saga.Exception.Exception: SAGA Exception (NoSuccess): [saga.plugin.job.ssh] Couldn't run job because: cannot concatenate 'str' and 'NoneType' objects
Traceback (most recent call last):
  File "bliss/plugins/ssh/job.py", line 203, in job_run
    self.bookkeeper.get_process_for_job(job).run(job.get_description(), service._url)
  File "bliss/plugins/ssh/process.py", line 192, in run
    full_line = "echo $$ && " + cdline + "("+envline+"'"+cmdline+" "+argline+"')" + "> "+ jd.output + " 2> " + jd.error
TypeError: cannot concatenate 'str' and 'NoneType' objects