On Tue 04 Aug 2009 at 02:41PM, Shawn Walker wrote:
> [email protected] wrote:
> >Folks,
> >Ed seems to be hitting all of our libcurl bugs.  He's been getting some
> >kind of progress tracking mismatch that we've been trying to track down.
> >With the latest code, he gets a type mismatch trying to print out the
> >values.  This implies that somehow one or more of these values isn't an
> >integer.  I've gone back and adjusted to code to convert the values to
> >strings.  This change also makes sure that all of the values passed to
> >download_add_progress are integers.
> >
> >     http://cr.opensolaris.org/~johansen/webrev-10449/

I'm very confused here.

progress.py:

      185 +                        emsg("\nExpected %s pkgs, received %s pkgs 
instead." %
      186                              (self.dl_goal_npkgs, self.dl_cur_npkgs))

   I'm lost.  How could these not be ints?  We specifically set
   dl_cur_npkgs = 0 in the constructor.

   Wouldn't it make more sense to assert the type of the input parameters
   into the progress tracking?

transport.py:
      836 +                self._progtrack.download_add_progress(-1 ,int(-size))

        If 'size' is not an int to begin with, how can it be negated
        before a cast to int?


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

Reply via email to