[conduit/google-calendar: 32/173] Reenable Google Calendar support with urllib unquote fix



commit e27d3d81a90270e9293a2da7d786dfa01de6c629
Author: Neil Loknath <neil loknath gmail com>
Date:   Thu Apr 23 03:54:06 2009 -0700

    Reenable Google Calendar support with urllib unquote fix
---
 conduit/modules/GoogleModule/GoogleModule.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/conduit/modules/GoogleModule/GoogleModule.py b/conduit/modules/GoogleModule/GoogleModule.py
index f89ca33..18da110 100644
--- a/conduit/modules/GoogleModule/GoogleModule.py
+++ b/conduit/modules/GoogleModule/GoogleModule.py
@@ -1,6 +1,7 @@
 import os
 import re
 import urlparse
+import urllib
 import gobject
 import datetime
 import dateutil.parser
@@ -30,16 +31,16 @@ Utils.dataprovider_add_dir_to_path(__file__)
 try:
     import atom.service
     import gdata.service
-    import gdata.photos.service    
+    import gdata.photos.service
     import gdata.calendar.service
     import gdata.contacts.service
     import gdata.docs.service
     import gdata.youtube.service
 
     MODULES = {
-#        "GoogleCalendarTwoWay" : { "type": "dataprovider" },
+        "GoogleCalendarTwoWay" : { "type": "dataprovider" },
         "PicasaTwoWay" :         { "type": "dataprovider" },
-        "YouTubeTwoWay" :        { "type": "dataprovider" },    
+        "YouTubeTwoWay" :        { "type": "dataprovider" },
         "ContactsTwoWay" :       { "type": "dataprovider" },
         "DocumentsSink" :        { "type": "dataprovider" },
     }
@@ -58,7 +59,7 @@ class _GoogleBase:
         self.password = ""
         self.loggedIn = False
         self.service = service
-        
+
         if conduit.GLOBALS.settings.proxy_enabled():
             log.info("Configuring proxy for %s" % self.service)
             host,port,user,password = conduit.GLOBALS.settings.get_proxy()
@@ -119,7 +120,7 @@ class _GoogleCalendar:
 
     @classmethod    
     def from_google_format(cls, calendar):
-        uri = calendar.id.text.split('/')[-1]
+        uri = urllib.unquote(calendar.id.text.split('/')[-1])
         name = calendar.title.text
         return cls(name, uri)
         



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]