From nalitoja@gmail.com  Mon Oct 10 19:00:19 2011
Return-Path: <nalitoja@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A8D3E106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 Oct 2011 19:00:19 +0000 (UTC)
	(envelope-from nalitoja@gmail.com)
Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 6C63B8FC15
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 Oct 2011 19:00:19 +0000 (UTC)
Received: by gyf2 with SMTP id 2so7211035gyf.13
        for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 Oct 2011 12:00:18 -0700 (PDT)
Received: by 10.236.127.144 with SMTP id d16mr26491132yhi.40.1318273218874;
        Mon, 10 Oct 2011 12:00:18 -0700 (PDT)
Received: from nil (politkovskaja.torservers.net. [77.247.181.165])
        by mx.google.com with ESMTPS id s77sm27399348yhe.22.2011.10.10.12.00.13
        (version=SSLv3 cipher=OTHER);
        Mon, 10 Oct 2011 12:00:17 -0700 (PDT)
Message-Id: <86zkh8d66d.fsf@gmail.com>
Date: Mon, 10 Oct 2011 18:59:34 +0000
From: Nali Toja <nalitoja@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] misc/metromap: fails to run with python27

>Number:         161471
>Category:       ports
>Synopsis:       [patch] misc/metromap: fails to run with python27
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    amdmi3
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 10 19:10:06 UTC 2011
>Closed-Date:    Mon Oct 10 22:39:18 UTC 2011
>Last-Modified:  Mon Oct 10 22:40:07 UTC 2011
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->amdmi3 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Oct 10 19:10:17 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=161471 
State-Changed-From-To: open->closed 
State-Changed-By: amdmi3 
State-Changed-When: Mon Oct 10 22:39:18 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=161471 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/161471: commit references a PR
Date: Mon, 10 Oct 2011 22:39:23 +0000 (UTC)

 amdmi3      2011-10-10 22:39:14 UTC
 
   FreeBSD ports repository
 
   Modified files:
     misc/metromap        Makefile 
   Added files:
     misc/metromap/files  patch-python27 
   Log:
   - Fix build with python 2.7
   
   PR:             161471
   Submitted by:   Nali Toja <nalitoja@gmail.com>
   
   Revision  Changes    Path
   1.19      +1 -0      ports/misc/metromap/Makefile
   1.1       +47 -0     ports/misc/metromap/files/patch-python27 (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
