def __init__(self, username, password, url = None): #$NON-NLS-1$ scheme = ZGoogleLoginAuthHandler.SCHEME self.baseURL = url if not self.baseURL: self.baseURL = ZPicasaServer.BASE_URL ZAtomServerBase.__init__(self, self.baseURL, username, password, scheme, None, u"ZPicasaServer") #$NON-NLS-1$ self.userID = username
def _sendAtomRequest(self, atomRequest): self._debug(u"ZPicasaServer using userid %s " % self.userID) #$NON-NLS-1$ self._debug(u"ZPicasaServer sendAtomRequest %s" % atomRequest.getUrl()) #$NON-NLS-1$ try: ZAtomServerBase._sendAtomRequest(self, atomRequest) self._debug(u"ZPicasaServer response %s %s" % (atomRequest.getHttpStatusCode(), atomRequest.getHttpStatusMessage()) )#$NON-NLS-1$ except Exception, e: self._warning(u"ZPicasaServer error %s %s" % (atomRequest.getHttpStatusCode(), atomRequest.getHttpStatusMessage()) )#$NON-NLS-1$ # code 404 = album or photo not found. if atomRequest.getHttpStatusCode() != 404: raise e