equal
deleted
inserted
replaced
42 def sshargs(sshcmd, host, user, port): |
42 def sshargs(sshcmd, host, user, port): |
43 '''Build argument list for ssh''' |
43 '''Build argument list for ssh''' |
44 args = user and ("%s@%s" % (user, host)) or host |
44 args = user and ("%s@%s" % (user, host)) or host |
45 return port and ("%s -p %s" % (args, port)) or args |
45 return port and ("%s -p %s" % (args, port)) or args |
46 |
46 |
47 def is_exec(f): |
47 def isexec(f): |
48 """check whether a file is executable""" |
48 """check whether a file is executable""" |
49 return (os.lstat(f).st_mode & 0100 != 0) |
49 return (os.lstat(f).st_mode & 0100 != 0) |
50 |
50 |
51 def setflags(f, l, x): |
51 def setflags(f, l, x): |
52 s = os.lstat(f).st_mode |
52 s = os.lstat(f).st_mode |