Francesco Romani has posted comments on this change. Change subject: lib: migration: add response.is_failure helper ......................................................................
Patch Set 6: (3 comments) https://gerrit.ovirt.org/#/c/42795/6//COMMIT_MSG Commit Message: Line 3: AuthorDate: 2015-06-23 18:13:29 +0200 Line 4: Commit: Francesco Romani <from...@redhat.com> Line 5: CommitDate: 2015-07-07 19:15:11 +0200 Line 6: Line 7: lib: migration: add response.is_failure helper > is_failure -> is_error Done Line 8: Line 9: Add little helper to make the code more explicit Line 10: and self-documenting. Line 11: https://gerrit.ovirt.org/#/c/42795/6/lib/vdsm/response.py File lib/vdsm/response.py: Line 26: Line 27: class MalformedResponse(Exception): Line 28: """ Line 29: Malformed response value Line 30: """ > This does not add much value, just repeating the class name. I think the n Done Line 31: Line 32: def __init__(self, res): Line 33: super(MalformedResponse, self).__init__( Line 34: "Malformed response: %s" % str(res)) Line 30: """ Line 31: Line 32: def __init__(self, res): Line 33: super(MalformedResponse, self).__init__( Line 34: "Malformed response: %s" % str(res)) > We don't need to repeat the name of the class in the message. If you try to Good point and thanks for the reminder. Done. Line 35: self.response = res Line 36: Line 37: Line 38: def success(message=None, **kwargs): -- To view, visit https://gerrit.ovirt.org/42795 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ccefec4f1bebcb2ca64f0bc9f6b9e9954dbf04c Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki <mmire...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches