Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread johansen
> > - lines 1954 - 1968: I think the ordering of these exception handlers > > is backwards. Since InvalidContentException is a subclass of > > TransportException, the first TransportException handler is going to > > catch _all_ of the TransportExceptions, including InvalidContent. I

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Dan Price
On Wed 08 Oct 2008 at 10:39AM, [EMAIL PROTECTED] wrote: > Hey Dan, > > Thanks for making these changes. I like the format of the output. I > also appreciate you taking the time to make the transport exceptions > into an orderly hierarchy. > > > http://cr.opensolaris.org/~dp/pkg-timeout > > Comm

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Dan Price
On Wed 08 Oct 2008 at 10:57AM, Danek Duvall wrote: > On Wed, Oct 08, 2008 at 01:50:33AM -0700, Dan Price wrote: > > > http://cr.opensolaris.org/~dp/pkg-timeout > > client.py: > > - line 1958: given that you're now catching a more generic exception, > does the text here still hold in all ca

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Dan Price
On Wed 08 Oct 2008 at 10:33AM, Brock Pytlik wrote: > General comment: > Can you check installupdate.py line 619 and see if this should be > changed to a TransportException? Fixed. Also fixed the gui to know about global_settings (oops!) > retrieve.py: > line 266-267: I think these are covered b

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Dan Price
On Wed 08 Oct 2008 at 04:28PM, Shawn Walker wrote: > As long as there's a bug filed for now, I'm happy... > > The benefits the improvements bring outweigh my unhappiness regarding > the placement. I moved global_settings into pkg.client. I just don't have the cycles to rewhack env. var processi

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Brock Pytlik
Dan Price wrote: > On Wed 08 Oct 2008 at 02:12PM, Shawn Walker wrote: > >> [EMAIL PROTECTED] wrote: >> I wasn't aware that pkg.client was considered the exclusive domain of the cli given that much of it's code is shared. >>> Last time I checked, client.py was the CL

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Dan Price
On Wed 08 Oct 2008 at 10:30AM, Shawn Walker wrote: > Dan Price wrote: > >Folks, > > > >I have the following fixes for you to review: > > > >3777 PKG_TIMEOUT_MAX is a placebo setting > >3778 We can be more informative and accurate when timeouts happen > >3779 Some KeyboardInterrupt exception handlin

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Shawn Walker
Dan Price wrote: > On Wed 08 Oct 2008 at 02:12PM, Shawn Walker wrote: >> [EMAIL PROTECTED] wrote: I wasn't aware that pkg.client was considered the exclusive domain of the cli given that much of it's code is shared. >>> Last time I checked, client.py was the CLI. Did you mean you wanted

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Dan Price
On Wed 08 Oct 2008 at 02:12PM, Shawn Walker wrote: > [EMAIL PROTECTED] wrote: > >> I wasn't aware that pkg.client was considered the exclusive domain of > >> the cli given that much of it's code is shared. > > > > Last time I checked, client.py was the CLI. Did you mean you wanted the > > code t

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Shawn Walker
[EMAIL PROTECTED] wrote: >> I wasn't aware that pkg.client was considered the exclusive domain of >> the cli given that much of it's code is shared. > > Last time I checked, client.py was the CLI. Did you mean you wanted the > code to live somewhere in modules/client? Yes, as in the pkg.client

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread johansen
> I wasn't aware that pkg.client was considered the exclusive domain of > the cli given that much of it's code is shared. Last time I checked, client.py was the CLI. Did you mean you wanted the code to live somewhere in modules/client? > If your concern is about crossing boundaries, then it sho

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Shawn Walker
[EMAIL PROTECTED] wrote: >>> misc.py: >>>line 424: what about having global_settings in pkg.client instead? >>> it would seem a better home than "misc" for something central to the client. > > I disagree about moving it into client.py. It should be possible for > these environment variables

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Danek Duvall
On Wed, Oct 08, 2008 at 01:50:33AM -0700, Dan Price wrote: > http://cr.opensolaris.org/~dp/pkg-timeout client.py: - line 1958: given that you're now catching a more generic exception, does the text here still hold in all cases? misc.py: - line 450: if exceptions isn't a sequence ... ?

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread johansen
> > - TransportExceptions: Thanks again for making this more orderly. > > This is getting large enough that I'm wondering if it should be in > > another file for exceptions, or transport exceptions. It's fine if > > you leave it in misc for now, but it is starting to take up a lot o

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Brock Pytlik
[EMAIL PROTECTED] wrote: > [snip] > > - TransportExceptions: Thanks again for making this more orderly. > This is getting large enough that I'm wondering if it should be in > another file for exceptions, or transport exceptions. It's fine if > you leave it in misc for now, but it is

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Brad Hall
On Wed, Oct 08, 2008 at 10:36:18AM -0700, Brock Pytlik wrote: > Brad Hall wrote: > >On Wed, Oct 08, 2008 at 10:30:10AM -0500, Shawn Walker wrote: > > > >>Dan Price wrote: > >> > >>>Folks, > >>> > >>>I have the following fixes for you to review: > >>> > >>>3777 PKG_TIMEOUT_MAX is a placebo set

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread johansen
Hey Dan, Thanks for making these changes. I like the format of the output. I also appreciate you taking the time to make the transport exceptions into an orderly hierarchy. > http://cr.opensolaris.org/~dp/pkg-timeout Comments below: client.py: - lines 1814 and 1819: Since we have a global s

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Brock Pytlik
Brad Hall wrote: > On Wed, Oct 08, 2008 at 10:30:10AM -0500, Shawn Walker wrote: > >> Dan Price wrote: >> >>> Folks, >>> >>> I have the following fixes for you to review: >>> >>> 3777 PKG_TIMEOUT_MAX is a placebo setting >>> 3778 We can be more informative and accurate when timeouts happen

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread johansen
> > misc.py: > >line 424: what about having global_settings in pkg.client instead? > > it would seem a better home than "misc" for something central to the client. I disagree about moving it into client.py. It should be possible for these environment variables to work whether you're using th

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Brock Pytlik
General comment: Can you check installupdate.py line 619 and see if this should be changed to a TransportException? retrieve.py: line 266-267: I think these are covered by lines 284-285. One of the pairs should be removed Brock Dan Price wrote: > Folks, > > I have the following fixes for you t

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Brad Hall
On Wed, Oct 08, 2008 at 10:30:10AM -0500, Shawn Walker wrote: > Dan Price wrote: > > Folks, > > > > I have the following fixes for you to review: > > > > 3777 PKG_TIMEOUT_MAX is a placebo setting > > 3778 We can be more informative and accurate when timeouts happen > > 3779 Some KeyboardInterrupt

Re: [pkg-discuss] code review: timeout improvements

2008-10-08 Thread Shawn Walker
Dan Price wrote: > Folks, > > I have the following fixes for you to review: > > 3777 PKG_TIMEOUT_MAX is a placebo setting > 3778 We can be more informative and accurate when timeouts happen > 3779 Some KeyboardInterrupt exception handling can be cleaner > > http://cr.opensolaris.org/~dp/pkg-time

[pkg-discuss] code review: timeout improvements

2008-10-08 Thread Dan Price
Folks, I have the following fixes for you to review: 3777 PKG_TIMEOUT_MAX is a placebo setting 3778 We can be more informative and accurate when timeouts happen 3779 Some KeyboardInterrupt exception handling can be cleaner http://cr.opensolaris.org/~dp/pkg-timeout This provides some substantia