[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#538723: python-apt: Please allow a way to get "raw" data for a tag



On Sun, Jul 26, 2009 at 06:10:39PM +0200, Julian Andres Klode wrote:
> On Sun, Jul 26, 2009 at 05:18:01PM +0200, John Wright wrote:
> > On Sun, Jul 26, 2009 at 05:04:34PM +0200, John Wright wrote:
> > > Package: python-apt
> > > Version: 0.7.11.0
> > > Severity: wishlist
> > > Tags: patch
> > > 
> > > There are times when it would be nice to get the raw data for a tag,
> > > without any white space stripped off the front.  For example, see
> > > #538376, where we would like to know if the data started with a newline.
> > > 
> > > I have attached a patch that adds a FindRaw method to TagSection.
> 
> I'll add it as "find_raw()" in 0.7.92 (aka 0.8 Beta 1), which should
> hit experimental a few days after the release of apt 0.7.22 (which
> should happen within the next weeks).

Great, thanks!  Do you know when it might find its way into unstable?

> > --- a/python/tag.cc
> > +++ b/python/tag.cc
> > +   char *Default = 0;
> > +   if (PyArg_ParseTuple(Args,"s|z",&Name,&Default) == 0)
> > +      return 0;
> By the way, Default should just be any Python object. There's no
> need to restrict the user from passing what he wants to.

Ah, that makes sense.  But I just cut and pasted from the implementation
of the Find method...

-- 
John Wright <jsw@debian.org>



Reply to: