conduit r1656 - in trunk: . conduit/modules/GoogleModule



Author: jstowers
Date: Sun Aug 10 05:53:41 2008
New Revision: 1656
URL: http://svn.gnome.org/viewvc/conduit?rev=1656&view=rev

Log:
	* conduit/modules/GoogleModule/GoogleModule.py: Create the album if
	it does not exist. Fixes #545824 (Manuel J. Garrido)


Modified:
   trunk/   (props changed)
   trunk/ChangeLog
   trunk/conduit/modules/GoogleModule/GoogleModule.py

Modified: trunk/conduit/modules/GoogleModule/GoogleModule.py
==============================================================================
--- trunk/conduit/modules/GoogleModule/GoogleModule.py	(original)
+++ trunk/conduit/modules/GoogleModule/GoogleModule.py	Sun Aug 10 05:53:41 2008
@@ -609,15 +609,20 @@
         except Exception, e:
             raise Exceptions.SyncronizeError("Picasa Update Error.")
 
-    def _get_album(self):
+    def _find_album(self):
         for name,album in self._get_albums():
             if name == self.albumName:
                 log.debug("Found album %s" % self.albumName)
-                self.galbum = album
-                return
+                return album
+
+        return None
 
-        log.debug("Creating new album %s." % self.albumName)
-        self.galbum = self._create_album(self.albumName)
+    def _get_album(self):
+        self.galbum = self._find_album()
+        if not self.galbum:
+            log.debug("Creating new album %s." % self.albumName)
+            self._create_album(self.albumName)
+            self.galbum = self._find_album()
 
     def _get_albums(self):
         albums = []



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