Eoghan Glynn has posted comments on this change. Change subject: sdk: Add session support ......................................................................
Patch Set 1: I would prefer that you didn't submit this (4 inline comments) Hi Juan, A couple of typos and stylistic nits inline. Cheers, Eoghan .................................................... File src/ovirtsdk/infrastructure/proxy.py Line 29: From the point of view fo the CookieJar it looks like a urllib2 request and Spelling not ... - From the point of view fo ... + From the point of view of ... Line 64: return self._headers.get(header_name.lower(), defaul) Another typo: - return self._headers.get(header_name.lower(), defaul) + return self._headers.get(header_name.lower(), default) Line 84: return result More pythonic as: - result = [] - for key, value in self._headers.items(): - if key.lower() == name.lower(): - result.append(value) - return result + return [self._headers[k.lower()] for k in self._headers.keys() if k.lower() == name.lower()] However, I'm not sure you really need any more than: + return [self._headers[name.lower()]] as it seems you already ensure the key is lower-case on insertion into the _headers dict. Line 148: headers[key] = value More pythonic as: - for key, value in response.getheaders(): - headers[key] = value + headers = dict(response.getheaders()) -- To view, visit http://gerrit.ovirt.org/4044 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I098f7195777ee2c93b84b9ef461044b0fc697b10 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <[email protected]> Gerrit-Reviewer: Eoghan Glynn <[email protected]> Gerrit-Reviewer: Michael Pasternak <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
