On Fri, Feb 29, 2008 at 5:02 PM, Cyril Plisko <[EMAIL PROTECTED]> wrote:
> On Fri, Feb 29, 2008 at 7:38 AM, Bart Smaalders <[EMAIL PROTECTED]> wrote:
> > http://cr.opensolaris.org/~barts/bug-539/
>
> Bart,
>
> any particular reason to _not_ doing clean-up in "finally" clause ?
>
> So that this code
>
Forgot to mention the file in hand - it is src/client.py
> 317 try:
> 318 img.list_install(pkg_list, progresstracker,
> filters = filters,
> 319 verbose = verbose, noexecute = noexecute)
> 320 except RuntimeError, e:
> 321 print >> sys.stderr, _("install failed: %s") % e
> 322 ret_code = 1
> 323 except:
> 324 img.cleanup_downloads()
> 325 raise
> 326 else:
> 327 ret_code = 0
> 328
> 329 img.cleanup_downloads()
>
> will turn into
>
> 317 try:
> 318 img.list_install(pkg_list, progresstracker,
> filters = filters,
> 319 verbose = verbose, noexecute = noexecute)
> 320 except RuntimeError, e:
> 321 print >> sys.stderr, _("install failed: %s") % e
> 322 ret_code = 1
> 323 except:
> 324 raise
> 325 else:
> 326 ret_code = 0
> 327 finally:
> 328 img.cleanup_downloads()
>
>
> --
> Regards,
> Cyril
>
--
Regards,
Cyril
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss