On Wed 09 Apr 2008 at 10:47PM, Danek Duvall wrote:
> > Callers of __call-- perhaps you could commonize all of this
> > code into __call()?
> > 
> >  285  301        args = add_base + ("-p", i, self.attrs["name"])
> >  286      -      retcode = subprocess.call(args)
> >       302 +      retcode, stdout = self.__call(args)
> >  287  303        if retcode != 0:
> >  288  304                print "%s (%s) upgrade (addition of policy " \
> >  289  305                    "'%s') failed with return code %s" % \
> >  290  306                    (self.name, self.attrs["name"], i, retcode)
> >  291  307                print "command run was ", args
> >       308 +              print "command output was", stdout.read()
> > 
> > Becomes:
> > 
> >         self.__call(fail="%s (%s) upgrade (addition of policy " \
> >             "'%s') failed." % (self.name, self.attrs["name"], i)
> 
> That would certainly make implementing your first suggestion a lot easier.
> I can implement it now, if you think it's important enough.  I suspect that
> we won't see these much, but I dunno.

Feel free to just file an bug-- perhaps it'll be picked up as a
bite-sized sort of contribution.

        -dp

-- 
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to