@@ -676,7 +676,6 @@ def get(self, path_segment="", owner=None, app=None, sharing=None, **query):
676676 # self.path to the Endpoint is relative in the SDK, so passing
677677 # owner, app, sharing, etc. along will produce the correct
678678 # namespace in the final request.
679- path_segment = UrlEncoded (path_segment , encode_slash = True )
680679 if path_segment .startswith ('/' ):
681680 path = path_segment
682681 else :
@@ -1520,7 +1519,6 @@ def delete(self, name, **params):
15201519 assert 'my_saved_search' not in saved_searches
15211520 """
15221521
1523- name = UrlEncoded (name , encode_slash = True )
15241522 if 'namespace' in params :
15251523 namespace = params .pop ('namespace' )
15261524 params ['owner' ] = namespace .owner
@@ -1964,7 +1962,6 @@ def __getitem__(self, key):
19641962 if isinstance (key , tuple ) and len (key ) == 2 :
19651963 # Fetch a single kind
19661964 key , kind = key
1967- key = UrlEncoded (key , encode_slash = True )
19681965 try :
19691966 response = self .get (self .kindpath (kind ) + "/" + key )
19701967 entries = self ._load_list (response )
@@ -1981,7 +1978,6 @@ def __getitem__(self, key):
19811978 raise
19821979 else :
19831980 # Iterate over all the kinds looking for matches.
1984- key = UrlEncoded (key , encode_slash = True )
19851981 kind = None
19861982 candidate = None
19871983 for kind in self .kinds :
@@ -2015,7 +2011,6 @@ def __contains__(self, key):
20152011 except KeyError :
20162012 return False
20172013 else :
2018- key = UrlEncoded (key , encode_slash = True )
20192014 # Without a kind, we want to minimize the number of round trips to the server, so we
20202015 # reimplement some of the behavior of __getitem__ in order to be able to stop searching
20212016 # on the first hit.
@@ -2077,7 +2072,7 @@ def create(self, name, kind, **kwargs):
20772072 # its path will be <restrictToHost>:<name>, not just <name>,
20782073 # and we have to adjust accordingly.
20792074
2080- # Must check if the name passed in is UrlEncoded and change it accordingly .
2075+ # Url encodes the name of the entity .
20812076 name = UrlEncoded (name , encode_slash = True )
20822077 path = _path (
20832078 self .path + kindpath ,
0 commit comments