tools: fixed problem with local test
[treecutter.git] / treecutter / tools.py
index f294c61106d8cfa025d8d660163001c6e9c7ddf4..a9c94a0837b7cf523ff17d40d1e361a027b75706 100644 (file)
@@ -20,7 +20,10 @@ def publish(src,target):
 def ssh_cmd(target, command):
     t = target.split(":")
     c = command.split()
-    cmd = ["ssh",t[0],c[0],c[1],t[1]]
+    if len(t)==1:
+        cmd = [c[0],c[1],t[0]]
+    else:
+        cmd = ["ssh",t[0],c[0],c[1],t[1]]
     retcode = subprocess.call(cmd)
     if retcode:
         print 'Error: '+' '.join(cmd)+' Returncode ['+str(retcode)+']'