Code review comment for lp:~stevenk/launchpad/db-add-derivedistroseries-api

Revision history for this message
Graham Binns (gmb) wrote :

On 12 October 2010 11:43, Steve Kowalik <email address hidden> wrote:
> Hi Graham,
>
> The reason I'm checking for those arguments is because the API call can be used one of two ways. Firstly, it can create the distroseries for the caller, and secondly, it can use the distroseries that already exists, so we only need to check if arguments are set if we are creating a distroseries.

Okay, I see your reasoning. However, I think that the code still needs
clarification. I'd rather see:

  if not displayname:
      raise DerivationError(...)
  if not title:
      raise DerivationError(...)
...

Etc. That way it's clearer upon reading what's going on.

« Back to merge proposal