Hi Here I have a problem with postreview.py when publish a review request, could anyone please have a look?
My enviroment is Reviewboard 1.5.1 and SVN. I downloaded postreview.py from https://github.com/reviewboard/rbtools/blob/184334a7a5ddc24172ae2aa0364f13aabe037470/rbtools/postreview.py, and configed the constants necessary. When I run postreivew, it throws a array index exception at line 677: url = rsp['links']['info']['href'], The whole piece of code is def get_repository_info(self, rid): """ Returns detailed information about a specific repository. """ if self.deprecated_api: url = 'api/json/repositories/%s/info/' % rid else: rsp = self.api_get( '%s%s/' % (self.root_resource['links']['repositories'] ['href'], rid)) url = rsp['links']['info']['href'] rsp = self.api_get(url) return rsp['info'] I added debug info for rep, it did not contain the "links" index indeed, but it contained a "repository" index. Then I manually went to check the xml from reviewboard server, and found the structure of the xml is like this <rsp> <repository> <links> <info> <href> so I changed line 677 to url = rsp["repository"]['links']['info'] ['href'], finally it worked. Though it worked, I still did not know the reason and whether my change is right or wrong. I think it is unlike to be a bug of reviewboard, but I am too lazy to read all the code :-) so, could anyone kindly tell me that what the real problem is and what should I do? Any help will be highly appreciated! -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~----------~----~----~----~------~----~------~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en