Date: Sun, 5 Sep 2010 02:32:35 GMT From: Erick Crager <erick.crager@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/150294: hellanzb fails to run due to string compare bug Message-ID: <201009050232.o852WZpG027062@www.freebsd.org> Resent-Message-ID: <201009050240.o852e3gb020784@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 150294 >Category: ports >Synopsis: hellanzb fails to run due to string compare bug >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 05 02:40:03 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Erick Crager >Release: 8.1-RELEASE >Organization: >Environment: FreeBSD bastion.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: hellanzb.py does not function properly when built from ports. It seems the version from ports has a string comparison bug in /usr/local/lib/python2.6/site-packages/Hellanzb/HellaReactor.py. I have attached a very simple fix to this bug report that should correct the problem. >How-To-Repeat: 1. Install news/hellanzb from ports. 2. Try to run it: `hellanzb.py`. You will see: $ hellanzb.py /usr/local/lib/python2.6/site-packages/twisted/internet/default.py:15: DeprecationWarning: twisted.internet.default is deprecated. Use posixbase or selectreactor instead. warnings.warn("twisted.internet.default is deprecated. Use posixbase or selectreactor instead.", category=DeprecationWarning) Traceback (most recent call last): File "/usr/local/bin/hellanzb.py", line 14, in <module> from Hellanzb.Core import main File "/usr/local/lib/python2.6/site-packages/Hellanzb/Core.py", line 9, in <module> from Hellanzb.HellaReactor import HellaReactor File "/usr/local/lib/python2.6/site-packages/Hellanzb/HellaReactor.py", line 19, in <module> from twisted.internet.default import _NO_FILENO ImportError: cannot import name _NO_FILENO >Fix: Here is a simple one-line fix for the problem: $ diff -u /usr/local/lib/python2.6/site-packages/Hellanzb/HellaReactor.py HellaReactor.py --- /usr/local/lib/python2.6/site-packages/Hellanzb/HellaReactor.py 2010-09-04 19:28:03.000000000 -0700 +++ HellaReactor.py 2010-09-04 19:26:56.000000000 -0700 @@ -9,7 +9,7 @@ import Hellanzb, sys, time import twisted.copyright -if twisted.copyright.version >= '2.0.0': +if float(twisted.copyright.version.split('.',1)[0]) >= 2.0: from twisted.internet.selectreactor import SelectReactor from twisted.internet.selectreactor import _NO_FILENO from twisted.internet.selectreactor import _NO_FILEDESC >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009050232.o852WZpG027062>