import time
import traceback
-import paramiko
+try:
+ import paramiko
+except ImportError:
+ print >> sys.stderr, \
+ ("The \"paramiko\" module could not be imported. Install it from your"
+ " distribution's repository. The package is usually named"
+ " \"python-paramiko\".")
+ sys.exit(1)
REMOTE_PATH_BASE = "/tmp/listrunner"
print " %s: uploading files" % hostname
upload_dir = UploadFiles(connection, executable,
filelist, logfile)
- command = ("cd %s && ./%s %s" %
- (upload_dir, os.path.basename(executable), exec_args))
+ command = ("cd %s && ./%s" %
+ (upload_dir, os.path.basename(executable)))
+ if exec_args:
+ command += " %s" % exec_args
print " %s: executing remote command" % hostname
cmd_result = RunRemoteCommand(connection, command, logfile)
if cmd_result is True: