kumama go言語とかgolangとかGAEとかネットサービスとかその他色々・・・

28Apr/110

gdata-python-client 2.0.14

gCalのnsの項目が拾えない…
uidが拾えないのが致命的…。

Fix typos in the calendar module.

403くらってデータ取れない事多数・・・

Code Review http://codereview.appspot.com/4284066/ Issue 4284066: Fix for RequestError caused by too...

どっちも hg のリポジトリは更新されてるんだけど…。

例によって誰かの役に立つかもなので差分貼っておこう。

diff -urN ./gdata-2.0.14/src/gdata/calendar/data.py ./gdata-2.0.14-kuma/gdata/calendar/data.py
--- ./gdata-2.0.14/src/gdata/calendar/data.py 2011-01-25 08:46:28 +0900
+++ ./gdata-2.0.14-kuma/gdata/calendar/data.py 2011-04-28 14:18:27 +0900
@@ -30,7 +30,8 @@

GCAL_NAMESPACE = 'http://schemas.google.com/gCal/2005'
-GCAL_TEMPLATE = '{http://schemas.google.com/gCal/2005/}%s'
+#GCAL_TEMPLATE = '{http://schemas.google.com/gCal/2005/}%s'
+GCAL_TEMPLATE = '{%s}%%s' % GCAL_NAMESPACE
WEB_CONTENT_LINK_REL = '%s/%s' % (GCAL_NAMESPACE, 'webContent')

diff -urN ./gdata-2.0.14/src/gdata/client.py ./gdata-2.0.14-kuma/gdata/client.py
--- ./gdata-2.0.14/src/gdata/client.py 2011-01-21 10:36:18 +0900
+++ ./gdata-2.0.14-kuma/gdata/client.py 2011-04-28 14:26:29 +0900
@@ -287,12 +287,13 @@
location = (response.getheader('Location')
or response.getheader('location'))
if location is not None:
- m = re.compile('[\?\&]gsessionid=(\w*)').search(location)
- if m is not None:
- self.__gsessionid = m.group(1)
+# m = re.compile('[\?\&]gsessionid=(\w*)').search(location)
+# if m is not None:
+# self.__gsessionid = m.group(1)
# Make a recursive call with the gsession ID in the URI to follow
# the redirect.
- return self.request(method=method, uri=uri, auth_token=auth_token,
+# return self.request(method=method, uri=uri, auth_token=auth_token,
+ return self.request(method=method, uri=location, auth_token=auth_token,
http_request=http_request, converter=converter,
desired_class=desired_class,
redirects_remaining=redirects_remaining-1,

Filed under: etc No Comments