Minor modification to Peers.py to improve the verbose of AddPeer
authorAnil-Kumar Vengalil <Anil-Kumar.Vengalil@sophia.inria.fr>
Wed, 1 Apr 2009 12:01:27 +0000 (12:01 +0000)
committerAnil-Kumar Vengalil <Anil-Kumar.Vengalil@sophia.inria.fr>
Wed, 1 Apr 2009 12:01:27 +0000 (12:01 +0000)
PLC/Peers.py

index bec019d..0314cd1 100644 (file)
@@ -65,7 +65,9 @@ class Peer(Row):
         (scheme, netloc, path, params, query, fragment) = urlparse(url)
         if scheme != "https":
             raise PLCInvalidArgument, "Peer URL scheme must be https"
-
+        if path[-1] != '/':
+            raise PLCInvalidArgument, "Peer URL should end with /"
+        
        return url
 
     def delete(self, commit = True):