def __saveHeader(self, hdr): tmp = rpmUtils.readHeaderBlob(hdr.unload()) rpmSourceUtils.saveHeader(tmp)
except (socket.error, socket.sslerror), e: if len(e.args) > 1: raise up2dateErrors.CommunicationError(e.args[1]) else: raise up2dateErrors.CommunicationError(e.args[0]) except rpclib.ProtocolError, e: raise up2dateErrors.CommunicationError(e.errmsg) except rpclib.ResponseError: raise up2dateErrors.CommunicationError( "Broken response from the server."); except rpclib.Fault, f: raise up2dateErrors.CommunicationError(f.faultString) bin = ret[0] hdr = rpmUtils.readHeaderBlob(bin.data) rpmSourceUtils.saveHeader(hdr) self.headerCache["%s-%s-%s.%s" % (hdr['name'], hdr['version'], hdr['release'], hdr['arch'])] = hdr return hdr def callback(total, complete): print "-- %s bytes of %s" % (total, complete) # FIXME: super ugly hack that deserves to die def updateHttpServer(packageSourceChain, logininfo, serverSettings): httpServer = getGETServer(LoginInfo.logininfo, serverSettings)
raise up2dateErrors.CommunicationError("Connection aborted by the user") except (socket.error, socket.sslerror), e: if len(e.args) > 1: raise up2dateErrors.CommunicationError(e.args[1]) else: raise up2dateErrors.CommunicationError(e.args[0]) except rpclib.ProtocolError, e: raise up2dateErrors.CommunicationError(e.errmsg) except rpclib.ResponseError: raise up2dateErrors.CommunicationError("Broken response from the server."); except rpclib.Fault, f: raise up2dateErrors.CommunicationError(f.faultString) bin = ret[0] hdr = rpmUtils.readHeaderBlob(bin.data) rpmSourceUtils.saveHeader(hdr) self.headerCache["%s-%s-%s.%s" % (hdr['name'], hdr['version'], hdr['release'], hdr['arch'])] = hdr return hdr def callback(total, complete): print "-- %s bytes of %s" % (total, complete) # FIXME: super ugly hack that deserves to die def updateHttpServer(packageSourceChain, logininfo, serverSettings): httpServer = getGETServer(LoginInfo.logininfo, serverSettings)