[gopher] Re: .names
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Dec 17, 2003 at 08:33:26AM -0600, John Goerzen wrote:
> On Tue, Dec 16, 2003 at 07:50:39PM -0600, Chris wrote:
> > under pygopherd it doesnt.
> OK, I think this is fixed. I have just uploaded PyGopherd 2.0.7. Or,
> you can apply the attached patch to your 2.0.6 installation.
OK, I'm a little red-faced now. Here's the full scoop.
I *had* ported the UMN Numb-handling code to Python, and it was in place
already. So the first patch I sent you was unnecessary.
What I failed to so was mimic the UMN behavior for situations where the
Numb was not specified. This broke the whole thing. So the real fix is
in 2.0.8, and attached. It works for me.
-- John
-- Attached file included as plaintext by Ecartis --
Index: pygopherd/handlers/UMN.py
===================================================================
--- pygopherd/handlers/UMN.py (revision 297)
+++ pygopherd/handlers/UMN.py (working copy)
@@ -266,17 +266,19 @@
return 1
if entry2.name == None:
return -1
+ e1num = entry1.getnum(0)
+ e2num = entry2.getnum(0)
# Equal numbers or no numbers: sort by title.
- if entry1.num == entry2.num:
+ if e1num == e2num:
return cmp(entry1.name, entry2.name)
# Same signs: use plain numeric comparison.
- if (self.sgn(entry1.num) == self.sgn(entry2.num)):
- return cmp(entry1.num, entry2.num)
+ if (self.sgn(e1num) == self.sgn(e2num)):
+ return cmp(e1num, e2num)
# Different signs: other comparison.
- if entry1.num > entry2.num:
+ if e1num > e2num:
return -1
else:
return 1
- [gopher] .names, Chris, 2003/12/16
- [gopher] Re: .names, John Goerzen, 2003/12/17
- [gopher] Re: .names, John Goerzen, 2003/12/17
- [gopher] Re: .names, John Goerzen, 2003/12/17
- [gopher] Re: .names,
John Goerzen <=
- [gopher] Re: .names, Chris, 2003/12/17
- [gopher] Re: .names, John Goerzen, 2003/12/17
- [gopher] Re: .names, Chris, 2003/12/17
- [gopher] Re: .names, John Goerzen, 2003/12/17
- [gopher] Re: .names, Chris, 2003/12/17
- [gopher] Re: .names, John Goerzen, 2003/12/17
|
|