src/hg-ssh
changeset 103 ae1845978e38
parent 79 3a58a95fae2f
child 106 0519745e7a57
equal deleted inserted replaced
102:4603948da317 103:ae1845978e38
    40     #logfile.write("Fail: %s\n" % message)
    40     #logfile.write("Fail: %s\n" % message)
    41     sys.stderr.write(message + "\n")
    41     sys.stderr.write(message + "\n")
    42     sys.exit(-1)
    42     sys.exit(-1)
    43 
    43 
    44 def getpath(path):
    44 def getpath(path):
    45     if path.endswith("/"):
    45     path = path.rstrip("/")
    46         path = path[:-1]
       
    47     if not ruleset.goodpath(path):
    46     if not ruleset.goodpath(path):
    48         fail("Disallowing path: %s" % path)
    47         fail("Disallowing path: %s" % path)
    49     return path
    48     return path
    50 
    49 
    51 def try_cmd(cmd):
    50 def try_cmd(cmd):