aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2011-02-26 17:05:34 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2011-02-26 17:05:34 +0000
commitf172b93291a7cbf4a694ce829c66688d9e2a8ee8 (patch)
tree88e7b1a4d9420f89f41b5310df185cab617ef488 /net
parent3d382aaaeb49e238e4e4c3b85b560a540c1d3e75 (diff)
downloadports-f172b93291a7cbf4a694ce829c66688d9e2a8ee8.tar.gz
ports-f172b93291a7cbf4a694ce829c66688d9e2a8ee8.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/googlecl/Makefile1
-rw-r--r--net/googlecl/files/patch-__init__.py40
-rw-r--r--net/googlecl/files/patch-base.py17
3 files changed, 58 insertions, 0 deletions
diff --git a/net/googlecl/Makefile b/net/googlecl/Makefile
index d78116e2785a..37039273c5db 100644
--- a/net/googlecl/Makefile
+++ b/net/googlecl/Makefile
@@ -7,6 +7,7 @@
PORTNAME= googlecl
PORTVERSION= 0.9.12
+PORTREVISION= 1
CATEGORIES= net www python
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
diff --git a/net/googlecl/files/patch-__init__.py b/net/googlecl/files/patch-__init__.py
new file mode 100644
index 000000000000..e377a15119e6
--- /dev/null
+++ b/net/googlecl/files/patch-__init__.py
@@ -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 --git a/net/googlecl/files/patch-base.py b/net/googlecl/files/patch-base.py
new file mode 100644
index 000000000000..233de1120da6
--- /dev/null
+++ b/net/googlecl/files/patch-base.py
@@ -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.