Received: with ECARTIS (v1.0.0; list gopher); Wed, 17 Dec 2003 09:29:24 -0600 (CST) Return-Path: X-Original-To: gopher@complete.org Delivered-To: gopher@complete.org Received: from localhost (localhost [127.0.0.1]) by glockenspiel.complete.org (Postfix) with ESMTP id 1B55DE2; Wed, 17 Dec 2003 09:29:23 -0600 (CST) Received: from gatekeeper.elmer.external.excelhustler.com (gatekeeper.excelhustler.com [68.99.114.105]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "gatekeeper.elmer.external.excelhustler.com", Issuer "excelhustler.com" (not verified)) by glockenspiel.complete.org (Postfix) with ESMTP id D3005D3; Wed, 17 Dec 2003 09:29:21 -0600 (CST) Received: from chatterbox.elmer.internal.excelhustler.com (unknown [192.168.0.12]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "chatterbox.elmer.internal.excelhustler.com", Issuer "excelhustler.com" (verified OK)) by gatekeeper.elmer.external.excelhustler.com (Postfix) with ESMTP id B9E6DE0189; Wed, 17 Dec 2003 09:29:17 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by chatterbox.elmer.internal.excelhustler.com (Postfix) with ESMTP id 810E75C009; Wed, 17 Dec 2003 09:29:17 -0600 (CST) Received: from wile.internal.excelhustler.com (wile.internal.excelhustler.com [192.168.1.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by chatterbox.elmer.internal.excelhustler.com (Postfix) with ESMTP id 5C8655C008; Wed, 17 Dec 2003 09:29:17 -0600 (CST) Received: by wile.internal.excelhustler.com (Postfix, from userid 1000) id 2E6D48B7E; Wed, 17 Dec 2003 09:29:17 -0600 (CST) Date: Wed, 17 Dec 2003 09:29:17 -0600 From: John Goerzen To: gopher@complete.org Subject: [gopher] Re: .names Message-ID: <20031217152917.GA17237@complete.org> References: <3FDFB66F.B5960867@hal3000.cx> <20031217143326.GA14174@complete.org> Mime-Version: 1.0 Content-type: text/plain Content-Disposition: inline In-Reply-To: <20031217143326.GA14174@complete.org> User-Agent: Mutt/1.4i X-Scanned-By: clamscan at chatterbox.elmer.internal.excelhustler.com X-Scanned-By: clamscan at complete.org Content-Transfer-Encoding: 8bit X-archive-position: 862 X-ecartis-version: Ecartis v1.0.0 Sender: gopher-bounce@complete.org Errors-to: gopher-bounce@complete.org X-original-sender: jgoerzen@complete.org Precedence: bulk Reply-to: gopher@complete.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: Gopher X-List-ID: Gopher List-subscribe: List-owner: List-post: List-archive: X-list: gopher 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