> > It will get caught by the client (cli or packagemanager). I'm not > sure > > if there will be cleanup required or not. I thought you would have > more > > insight than I do into what the consequences of essentially exiting > > > directly to client code from this deep might be. > > Some of the cleanup happens when any exception occurs due to the > try/finally block wrapped around extract_file. That should close files > and streams, and the cleanup_downloads() should remove any incomplete > files. Is the GUI stashing any additional state that needs to be > cleaned up upon cancellation?
Hello, Nope GUI shouldn't know about the image object, it should know only about api object, and cleanup should take place in the api itself, which is happening so additional state is not needed. New webrev (hopefully you will be fine with that and I can commit this Today): http://cr.opensolaris.org/~migi/09_10_2008_cancel_during_download_3717/ Changes to the previous ones are like you have suggested. I have moved this exception to: _extract_file(). I think is better to have self.is_canceled in the __init__ rather then in this function, since later on we can easily change this once we will be able to cancel in-mid download. best Michal _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
