Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-23 Thread Shawn Walker
On 01/23/10 03:31 AM, Tim Foster wrote: On Fri, 2010-01-22 at 13:45 -0600, Shawn Walker wrote: On 01/22/10 01:28 PM, Tim Foster wrote: thinking that ssl_cert was being set to '""' - sorry. Python considers "" to be False when evaluated, so that wouldn't matter either :) Yep, absolutely. It

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-23 Thread Tim Foster
On Fri, 2010-01-22 at 13:45 -0600, Shawn Walker wrote: > On 01/22/10 01:28 PM, Tim Foster wrote: > > thinking that ssl_cert was being set to '""' - sorry. > > Python considers "" to be False when evaluated, so that wouldn't matter > either :) Yep, absolutely. It was the os.path.isabs() check I w

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-22 Thread Brock Pytlik
Tim Foster wrote: Hi Shawn, On Fri, 2010-01-22 at 11:17 -0600, Shawn Walker wrote: line 2368, 2370: instead of "if and len() > 0" just use "if is not None" as everything else around it does You're right, I misread the comment, -- 2353 # None is checked for here so that a client can

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-22 Thread Shawn Walker
On 01/22/10 01:28 PM, Tim Foster wrote: Hi Shawn, On Fri, 2010-01-22 at 11:17 -0600, Shawn Walker wrote: line 2368, 2370: instead of "if and len()> 0" just use "if is not None" as everything else around it does You're right, I misread the comment, -- 2353 # None is checked for here so tha

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-22 Thread Tim Foster
Hi Shawn, On Fri, 2010-01-22 at 11:17 -0600, Shawn Walker wrote: > line 2368, 2370: instead of "if and len() > 0" just use "if > is not None" as everything else around it does You're right, I misread the comment, -- 2353 # None is checked for here so that a client can unset a ssl_cert or 2354

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-22 Thread Shawn Walker
On 01/22/10 11:05 AM, Tim Foster wrote: Hi all, On Wed, 2010-01-20 at 14:39 -0800, Brock Pytlik wrote: Shawn Walker wrote: I'd rather see us turn the relative path into an absolute path using os.path.normpath() and the working directory that was active at startup before the Image() or ImageInt

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-22 Thread Tim Foster
Hi all, On Wed, 2010-01-20 at 14:39 -0800, Brock Pytlik wrote: > Shawn Walker wrote: > > I'd rather see us turn the relative path into an absolute path using > > os.path.normpath() and the working directory that was active at > > startup before the Image() or ImageInterface() object is construct

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-20 Thread Shawn Walker
On 01/20/10 04:47 PM, Tim Foster wrote: On Wed, 2010-01-20 at 14:39 -0800, Brock Pytlik wrote: Shawn Walker wrote: I'd rather see us turn the relative path into an absolute path using os.path.normpath() and the working directory that was active at startup before the Image() or ImageInterface()

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-20 Thread Tim Foster
On Wed, 2010-01-20 at 14:39 -0800, Brock Pytlik wrote: > Shawn Walker wrote: > > I'd rather see us turn the relative path into an absolute path using > > os.path.normpath() and the working directory that was active at > > startup before the Image() or ImageInterface() object is constructed. > > >

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-20 Thread Brock Pytlik
Shawn Walker wrote: On 01/20/10 03:34 PM, Brock Pytlik wrote: Tim Foster wrote: Hi all, I've got fixes for two bugs here that I'd appreciate a code review of please: http://cr.opensolaris.org/~timf/11554,13987-pkg-arg-checks they're pretty minor changes I think, but comments welcome. cheers

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-20 Thread Shawn Walker
On 01/20/10 03:34 PM, Brock Pytlik wrote: Tim Foster wrote: Hi all, I've got fixes for two bugs here that I'd appreciate a code review of please: http://cr.opensolaris.org/~timf/11554,13987-pkg-arg-checks they're pretty minor changes I think, but comments welcome. cheers, tim __

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-20 Thread Brock Pytlik
Tim Foster wrote: Hi all, I've got fixes for two bugs here that I'd appreciate a code review of please: http://cr.opensolaris.org/~timf/11554,13987-pkg-arg-checks they're pretty minor changes I think, but comments welcome. cheers, tim _

Re: [pkg-discuss] Code review: some better error checking for the CLI

2010-01-20 Thread Shawn Walker
On 01/20/10 07:07 AM, Tim Foster wrote: Hi all, I've got fixes for two bugs here that I'd appreciate a code review of please: http://cr.opensolaris.org/~timf/11554,13987-pkg-arg-checks they're pretty minor changes I think, but comments welcome. I'm not certain we should make the change for b

[pkg-discuss] Code review: some better error checking for the CLI

2010-01-20 Thread Tim Foster
Hi all, I've got fixes for two bugs here that I'd appreciate a code review of please: http://cr.opensolaris.org/~timf/11554,13987-pkg-arg-checks they're pretty minor changes I think, but comments welcome. cheers, tim _