From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Feb 26 15:20:06 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71A931065679 for ; Sat, 26 Feb 2011 15:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4E1028FC16 for ; Sat, 26 Feb 2011 15:20:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1QFK6m3065821 for ; Sat, 26 Feb 2011 15:20:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1QFK6w5065820; Sat, 26 Feb 2011 15:20:06 GMT (envelope-from gnats) Resent-Date: Sat, 26 Feb 2011 15:20:06 GMT Resent-Message-Id: <201102261520.p1QFK6w5065820@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Herbert J. Skuhra" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C55E9106566B for ; Sat, 26 Feb 2011 15:18:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B45F98FC2C for ; Sat, 26 Feb 2011 15:18:58 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1QFIwTG008671 for ; Sat, 26 Feb 2011 15:18:58 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p1QFIwAJ008670; Sat, 26 Feb 2011 15:18:58 GMT (envelope-from nobody) Message-Id: <201102261518.p1QFIwAJ008670@red.freebsd.org> Date: Sat, 26 Feb 2011 15:18:58 GMT From: "Herbert J. Skuhra" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/155061: [Patch] net/googlecl - fix output of calendar list X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2011 15:20:06 -0000 >Number: 155061 >Category: ports >Synopsis: [Patch] net/googlecl - fix output of calendar list >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Feb 26 15:20:05 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Herbert J. Skuhra >Release: FreeBSD 8.2-STABLE i386 >Organization: >Environment: FreeBSD oslo.ath.cx 8.2-STABLE FreeBSD 8.2-STABLE #5 r219047: Sat Feb 26 13:13:03 CET 2011 herbert@oslo.ath.cx:/usr/obj/usr/src/sys/PC1 i386 >Description: When you run 'googlecl calendar list' instead of dates "None" is displayed; eg: Whatever,None instead of Whatever,Apr 01 20:00 - Apr 01 22:00 This has been fixed in subversion (revision 541): svn diff -r 540:541 http://googlecl.googlecode.com/svn/trunk/ Bug report: http://code.google.com/p/googlecl/issues/detail?id=358 Attached is the patch for net/googelcl. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN net/googlecl.bak/Makefile net/googlecl/Makefile --- net/googlecl.bak/Makefile 2011-02-17 09:30:54.000000000 +0100 +++ net/googlecl/Makefile 2011-02-17 09:35:33.000000000 +0100 @@ -7,6 +7,7 @@ PORTNAME= googlecl PORTVERSION= 0.9.12 +PORTREVISON= 1 CATEGORIES= net www python MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} diff -ruN net/googlecl.bak/files/patch-__init__.py net/googlecl/files/patch-__init__.py --- net/googlecl.bak/files/patch-__init__.py 1970-01-01 01:00:00.000000000 +0100 +++ net/googlecl/files/patch-__init__.py 2011-02-17 10:16:05.000000000 +0100 @@ -0,0 +1,40 @@ +--- src/googlecl/calendar/__init__.py.bak 2011-02-17 10:11:57.000000000 +0100 ++++ src/googlecl/calendar/__init__.py 2011-02-17 10:14:06.000000000 +0100 +@@ -235,12 +235,22 @@ + + + class CalendarEntryToStringWrapper(googlecl.base.BaseEntryToStringWrapper): ++ def __init__(self, entry, config): ++ """Initialize a CalendarEntry wrapper. ++ ++ Args: ++ entry: CalendarEntry to interpret to strings. ++ config: Configuration parser. Needed for some values. ++ """ ++ googlecl.base.BaseEntryToStringWrapper.__init__(self, entry) ++ self.config_parser = config ++ + @property + def when(self): + """When event takes place.""" + start_date, end_date, freq = get_datetimes(self.entry) +- print_format = googlecl.CONFIG.lazy_get(SECTION_HEADER, +- 'date_print_format') ++ print_format = self.config_parser.lazy_get(SECTION_HEADER, ++ 'date_print_format') + start_text = time.strftime(print_format, start_date) + end_text = time.strftime(print_format, end_date) + value = start_text + ' - ' + end_text +@@ -277,9 +287,9 @@ + + for entry in single_events: + print googlecl.base.compile_entry_string( +- CalendarEntryToStringWrapper(entry), +- options.fields.split(','), +- delimiter=options.delimiter) ++ CalendarEntryToStringWrapper(entry, client.config), ++ options.fields.split(','), ++ delimiter=options.delimiter) + + + #=============================================================================== diff -ruN net/googlecl.bak/files/patch-base.py net/googlecl/files/patch-base.py --- net/googlecl.bak/files/patch-base.py 1970-01-01 01:00:00.000000000 +0100 +++ net/googlecl/files/patch-base.py 2011-02-17 10:27:52.000000000 +0100 @@ -0,0 +1,17 @@ +--- src/googlecl/base.py.bak 2011-02-17 10:23:53.000000000 +0100 ++++ src/googlecl/base.py 2011-02-17 10:24:55.000000000 +0100 +@@ -671,12 +671,13 @@ + # with the missing field value. + val = getattr(wrapped_entry, attr.replace('-','_')) or missing_field_value + except ValueError, err: +- LOG.debug(err.args[0] + ' (Did not add value for field ' + attr + ')') ++ LOG.debug(err.args[0] + ' (value for field ' + attr + ')') + except AttributeError, err: + try: + # Last ditch effort to blindly grab the attribute + val = getattr(wrapped_entry.entry, attr).text or missing_field_value + except AttributeError: ++ LOG.debug(err.args[0] + ' (value for field ' + attr + ')') + val = missing_field_value + # Apparently, atom(?) doesn't always return a Unicode type when there are + # non-latin characters, so force everything to Unicode. >Release-Note: >Audit-Trail: >Unformatted: