Code review comment for lp:~thomir-deactivatedaccount/autopilot/fix-state-not-found

Revision history for this message
Martin Pitt (pitti) wrote :

Nitpick: Constructions like

  lambda: StateNotFoundError()

are redundant, just saying "StateNotFoundError" should suffice.

56 + def __str__(self):
57 + return self.message

This does the wrong thing for Python 2, as you initialize .message with an unicode, so you don't actually return a str (which is bytes in Python 2).

133 + err.message,

I think we shouldn't make .message an official API. In Python 3 exceptions don't have it any more, instead you'd just do str().

175 + unicode(err),

That will fail in Python 3. It's okay for the 1.3 branch, but must be skipped for trunk when running under Py3.

review: Needs Fixing

« Back to merge proposal