예제 #1
0
 def _getPicasaServer(self):
     if not self.picasaServer:
         username = None
         password = None
         if u"username" in self.properties:  #$NON-NLS-1$
             username = getNoneString(
                 self.properties[u"username"])  #$NON-NLS-1$
         if not username:
             raise ZException(
                 u"Picasa web album account username is required."
             )  #$NON-NLS-1$
         if u"password" in self.properties:  #$NON-NLS-1$
             password = getNoneString(
                 self.properties[u"password"])  #$NON-NLS-1$
         if not password:
             raise ZException(
                 u"Picasa web album account password is required."
             )  #$NON-NLS-1$
         self.picasaServer = ZPicasaServer(username, password)
         self.picasaServer.setLogger(getLoggerService())
     return self.picasaServer