On Thu, May 27, 2010 at 12:55:36PM +0530, Saurabh Vyas wrote:
> webrev : http://cr.opensolaris.org/~saurabhv/fix-10437-rev1/

imageplan.py:

  - lines 1026, 1028:  Shouldn't be catching the exception here.
  
  - lines 1029, 1030: This shoudl be handled in the CLI and GUI using a
    top-level handler for the type of error that you're rasing.

progress.py:

  - lines 196-213: Instead of adding all of this as text to the
    exception, I would create properties in the exception class for cur
    and goal npkgs, nfiles, and nbytes.

  - line 358: I updated the bug to reflect this, but
    IncompleteDownloadException doesn't correctly capture what has gone
    wrong here.  The API told the progress tracker how much data it
    expected to receive, but the numbers didn't match.  Incomplete
    downloads are okay, as long as they're not successful ones.  I would
    name this exception something like ProgressGoalMismatchException.

  - lines 358-369:  This doesn't belong in this file.  It should be in
    client/api_errors.py.  The exception should be a subclass of
    ApiError.  I would change the exception to accept the cur and goal
    counters from download done, and dynamically generate the error
    message in __str__ based upon what counters are mismatched.

pull.py:

  - lines 721-726: You should be catching this at the top-level handler
    and printing an error message there instead.

client.py and packagemanager.py:  Need to update the GUI and CLI to
properly cope with this exception.  You shouldn't be printing anything
from API code.

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to