ports/161471: [patch] misc/metromap: fails to run with python27
Nali Toja
nalitoja at gmail.com
Mon Oct 10 19:10:07 UTC 2011
>Number: 161471
>Category: ports
>Synopsis: [patch] misc/metromap: fails to run with python27
>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: Mon Oct 10 19:10:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Nali Toja
>Release: FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
python27-2.7.2_2
>Description:
It's broken since issue7113 landed, i.e.
http://hg.python.org/lookup/r83155
probably after python27 became the default at 2011/03/04 (bsd.python.mk)
I have no idea where 0.1.4 version in the launchpad link comes from.
>How-To-Repeat:
$ metromap
Traceback (most recent call last):
File "/usr/local/bin/metromap", line 368, in <module>
name = GetMapName(f)
File "/usr/local/share/metromap/modules/ReadMap.py", line 103, in GetMapName
return unicode(name, detect_encoding(name))
TypeError: coercing to Unicode: need string or buffer, list found
>Fix:
Obtained from: https://launchpad.net/~zerkalica/+archive/main/+sourcepub/1411331/+listing-archive-extra
--- rawconfigparserfix.patch begins here ---
--- modules/ReadMap.py 2010-07-01 11:22:36.000000000 +0400
+++ modules/ReadMap.py 2011-01-03 02:28:53.000000000 +0300
@@ -85,7 +85,7 @@
return None
def GetMapName(ini):
- cp = ConfigParser.RawConfigParser()
+ cp = ConfigParser.RawConfigParser(allow_no_value=True)
try:
cp.readfp(ini)
except:
@@ -105,7 +105,7 @@
return None
def GetMapVec(ini):
- cp = ConfigParser.RawConfigParser()
+ cp = ConfigParser.RawConfigParser(allow_no_value=True)
try:
cp.readfp(ini)
except:
@@ -568,7 +568,7 @@
self.Graph[i] = filter(lambda a: a[0] not in uclist, self.Graph[i])
def _load_vec(self):
- cp = ConfigParser.RawConfigParser()
+ cp = ConfigParser.RawConfigParser(allow_no_value=True)
try:
cp.readfp(self.vec)
except: #ConfigParser.readfp raises exception, when he thinks,
@@ -594,7 +594,7 @@
self.Stations[st]['vfile'] = cp_get(cp, section, self.Stations[st]['name_orig'], None)
def _load(self):
- cp = ConfigParser.RawConfigParser()
+ cp = ConfigParser.RawConfigParser(allow_no_value=True)
try:
cp.readfp(self.ini)
except: #ConfigParser.readfp raises exception, when he thinks,
@@ -945,7 +945,7 @@
self.name = None
self.data = dict()
self.enc = encoding
- cp = ConfigParser.RawConfigParser()
+ cp = ConfigParser.RawConfigParser(allow_no_value=True)
try:
cp.readfp(infodata)
except:
--- rawconfigparserfix.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list