X-Git-Url: https://source.tree.se/git?a=blobdiff_plain;f=treecutter%2Ftools.py;h=a9c94a0837b7cf523ff17d40d1e361a027b75706;hb=98c7fb4a79dda11aa974969489d1bae46a4ae946;hp=f294c61106d8cfa025d8d660163001c6e9c7ddf4;hpb=a0a32ffb3c090aa365bad24cc874c86eeb555a59;p=treecutter.git diff --git a/treecutter/tools.py b/treecutter/tools.py index f294c61..a9c94a0 100644 --- a/treecutter/tools.py +++ b/treecutter/tools.py @@ -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)+']'