Just use rstrip
authorPaul Crowley <paul@lshift.net>
Mon, 12 Oct 2009 12:03:53 +0100
changeset 103 ae1845978e38
parent 102 4603948da317
child 104 d9665b290636
Just use rstrip
src/hg-ssh
--- a/src/hg-ssh	Mon Oct 12 11:40:05 2009 +0100
+++ b/src/hg-ssh	Mon Oct 12 12:03:53 2009 +0100
@@ -42,8 +42,7 @@
     sys.exit(-1)
 
 def getpath(path):
-    if path.endswith("/"):
-        path = path[:-1]
+    path = path.rstrip("/")
     if not ruleset.goodpath(path):
         fail("Disallowing path: %s" % path)
     return path