930: Error building URL in the function '_make_url' in post-review.py

macdev%n*********@gtempacc******** (Google Code) (Is this you? Claim this profile.)
Sept. 27, 2009
What's the URL of the page containing the problem?
post-review function _make_url(self, path): has been failing for me in the
case where:

a) self.url = 'internal.server.local:1234/' 
b) path = api/json/reviewrequests/ or path = '/api/json/reviewrequests/'

this is due to app = ' ' caused by
app = urlparse(self.url)[2] 

I suggest the following changes:
a) change the '/' removal to be as follows (more intuitive)
 if path[0] == '/':
    path = path[1:]
b) chance else/if case to be
if(app == None or app == ''):
    url = urljoin(self.url, path)
else:
   url = urljoin(self.url, urljoin(app,path) )
chipx86
#1 chipx86
Do you still have this problem today? I tried to figure out what the failure case
was, but the current code seems to work fine as near as I can tell. I don't know when
app would end up being ' '.
  • +NeedInfo
  • +Component-RBTools
david
#2 david
  • -NeedInfo
    +Incomplete