Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [Patch] 2/5: multichan

Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

current
Discussion topic

2020-03-13: This site is going to be decommissioned and shut down very soon. Please copy and archive any data you wish to keep ASAP

Back to topic list

Re: [Patch] 2/5: multichan

Reply

Author Pauline Middelink <middelink at polyware dot nl>
Full name Pauline Middelink <middelink at polyware dot nl>
Date 2005-01-18 02:21:07 PST
Message On Mon, 17 Jan 2005 around 18:18:41 -0500, Jack Neely wrote:
> Pauline,

PS Its dudete :)

> This one I'm not going to take. Although I can agree that the code your
> are trying to replace is blatently confusing. (It confused me.)

The current code is simply wrong. When talking to a current with more
than one matching channel, the resulting header from up2date has a list
of channel names, seperated with a comma. No brackets however.

The problem is not in how to represent the list as a returnvalue,
but the ConstructParser simply croaks on such an input. It NEEDS
brackets before the parser even accepts comma's. Hence the patch.

Its also very easy to create, as soon as you have a parent channel
and do an 'up2date -l', current goes byebye. So its not really an
exotic feature, its a patch for a real problem.

> It does look to me that the HTTP headers always contain a list of
> elements here, where XMLRPC wants a list of a list of elements.

Check.

> Although, I'd bet that at one point up2date may have sent headers where
> this was a list of lists, hence the code.

Could very well be. But i'm not quite sure if such a pre-95 version
a) is still existing, b) really had such a problem.

> On Mon, Jan 10, 2005 at 09:23:47PM +0100, Pauline Middelink wrote:
> > LS,
> >
> > Attached you ill find a small correction to make little better
> > handeling of the parsing of the channel subscription.
> >
> > Met vriendelijke groet,
> > Pauline Middelink
> > --
> > GPG Key fingerprint = 2D5B 87A7 DDA6 0378 5DEA BD3B 9A50 B416 E2D0 C3C2
> > For more details look at my website http://www.polyware.​nl/~middelink
>
> > diff -ur current-1.5.9.orig/auth.py /usr/share/current/auth.py
> > --- current-1.5.9.orig/auth.py 2005-01-05 15:04:55.000000000 +0100
> > +++ /usr/share/current/auth.py 2005-01-05 15:07:34.000000000 +0100
> > @@ -181,14 +181,11 @@
> > if not headers.has_key(attr):
> > raise Exception("Missing authentication header: %s" % attr)
> > else:
> > - cp = ConstructParser.Cons​tructParser(headers[​attr])
> > + cp = ConstructParser.Cons​tructParser("["+head​ers[attr]+"]")
> > try:
> > tmpHdr = cp.parseIt()
> > log ("Header object successfully parsed: %s" % tmpHdr, DEBUG2)
> > - if not type(tmpHdr[0]) == type([]):
> > - self.data['X-RHN-Aut​h-Channels'] = [tmpHdr]
> > - else:
> > - self.data['X-RHN-Aut​h-Channels'] = tmpHdr
> > + self.data['X-RHN-Aut​h-Channels'] = tmpHdr
> > except Exception, e:
> > log ("Exception caught: %s" % e, DEBUG2)
> > self.data['X-RHN-Aut​h-Channels'] = ''
> >
>
> > --------------------​--------------------​--------------------​---------
> > To unsubscribe, e-mail: dev-unsubscribe@curr​ent.tigris.org
> > For additional commands, e-mail: dev-help at current dot tigris dot org
>
> --
> Jack Neely <slack at quackmaster dot net>
> Realm Linux Administration and Development
> PAMS Computer Operations at NC State University
> GPG Fingerprint: 1917 5AC1 E828 9337 7AA4 EA6B 213B 765F 3B6A 5B89
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe@curr​ent.tigris.org
> For additional commands, e-mail: dev-help at current dot tigris dot org

    Met vriendelijke groet,
        Pauline Middelink
--
GPG Key fingerprint = 2D5B 87A7 DDA6 0378 5DEA BD3B 9A50 B416 E2D0 C3C2
For more details look at my website http://www.polyware.​nl/~middelink
Attachments

« Previous message in topic | 3 of 7 | Next message in topic »

Messages

Show all messages in topic

[Patch] 2/5: multichan Pauline Middelink <middelink at polyware dot nl> Pauline Middelink <middelink at polyware dot nl> 2005-01-10 12:23:47 PST
     Re: [Patch] 2/5: multichan Jack Neely <jjneely at pams dot ncsu dot edu> Jack Neely <jjneely at pams dot ncsu dot edu> 2005-01-17 15:18:41 PST
         Re: [Patch] 2/5: multichan Pauline Middelink <middelink at polyware dot nl> Pauline Middelink <middelink at polyware dot nl> 2005-01-18 02:21:07 PST
             Re: [Patch] 2/5: multichan theslack Jack Neely 2005-01-19 19:08:59 PST
                 Re: [Patch] 2/5: multichan hunterm Hunter Matthews 2005-02-03 19:12:14 PST
                     Re: [Patch] 2/5: multichan theslack Jack Neely 2005-02-09 13:08:45 PST
                         Re: [Patch] 2/5: multichan theslack Jack Neely 2005-02-20 17:58:07 PST
Messages per page: