[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 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).


> --- 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.

-- 
Julian Andres Klode  - Free Software Developer
   Debian Developer  - Contributing Member of SPI
   Ubuntu Member     - Fellow of FSFE

Website: http://jak-linux.org/   XMPP: juliank@jabber.org
Debian:  http://www.debian.org/  SPI:  http://www.spi-inc.org/
Ubuntu:  http://www.ubuntu.com/  FSFE: http://www.fsfe.org/



Reply to: