Ñò K4Qc@sdZddkZddkZddkZddkZddkiiZddkii Z ddk Z ddk Z ddkZyddkZddkZWn-ej o!e idIJe idƒnXdad„Zd„Zdd„Zd„Zdd „ZdS( sOface - provides the BUI (Browser User Interface) for the image packaging serveriÿÿÿÿNs6Mako 0.2.2 or greater is required to use this program.icCs2tiii|ƒtiid|igƒadS(s,Ensure that the BUI is properly initialized.t directoriesN( tpkgtservertfeedtinittmakotlookuptTemplateLookuptweb_rootttlookup(tdepot((s5/usr/lib/python2.6/vendor-packages/pkg/server/face.pyR1scCsq|iiotitidƒ‚n|ii|ƒiptitidƒ‚nt i i i ||||ƒS(Ns/Operation not supported in current server mode.s+No update history; unable to generate feed.( trepotmirrortcherrypyt HTTPErrorthttplibt NOT_FOUNDt get_catalogtupdatestSERVICE_UNAVAILABLERRRthandle(R trequesttresponsetpub((s5/usr/lib/python2.6/vendor-packages/pkg/server/face.pyR7s     cCsIti|ƒ}ti|||ƒ}|idh|d6|d6|d6ƒS(Ntg_varstbaseRt http_depot(R t get_templatetapit BaseInterfacetrender_unicode(R RtpathRRttemplateR((s5/usr/lib/python2.6/vendor-packages/pkg/server/face.pyt__render_template@scCs;|tijotid|dtƒntiƒ‚dS(Ns0Error encountered while processing template: %s t traceback(RRR tlogtTruetNotFound(Rterror((s5/usr/lib/python2.6/vendor-packages/pkg/server/face.pyt__handle_errorFs c Csë|iidƒ}|o/tiitii|i|ƒƒo d}n+|o#||ii jot i ƒ‚n|o|i |dƒidƒ}n*|ii iddƒ}|p d}n|djo d}nT|idƒddjo9|iihdd6d d 6d d 6ƒt||||ƒS|id ƒpŒti|ƒ}tii|i|ƒ}tii|ƒitii|iƒƒpt|tiƒSt iiitii|i|ƒƒSny?|iihdd6d d 6d d 6ƒt|||||ƒSWnÞti j oK}t i!dh|d6t"|ƒd6ƒt i!dƒt|itiƒSt#j o}t|ti$ƒSt%i&i'j o}t|tiƒSti(j o}t i)|i*ƒ‚nt|ti$ƒSXdS(s¥'http_depot' if set should be the resource that points to the top level of repository being served (referred to as the repo_prefix in depot_index.py)t/tt publishertprefixs index.shtmliRtExpiressno-cachetPragmas'no-cache, no-transform, must-revalidates Cache-Controls.shtmlsFTemplate '%(path)s' is incompatible with current server api: %(error)sRR&sGEnsure that the correct --content-root has been provided to pkg.depotd.N(+t path_infotstriptosRtexiststjoinRtNoneR t publishersR R%treplacetcfgt get_propertytsplittheaderstupdateRtendswithturllibtunquotetnormpatht startswithR'RRtlibtstatict serve_fileR!tsaetVersionExceptionR#tstrtIOErrortINTERNAL_SERVER_ERRORRt exceptionstTemplateLookupExceptiontRedirectExceptiont HTTPRedirecttdata( R RRRRRtspathtfnamete((s5/usr/lib/python2.6/vendor-packages/pkg/server/face.pytrespondPsT,         (t__doc__R tcherrypy.lib.staticRR0tpkg.server.apiRRtpkg.server.api_errorst api_errorsRCtpkg.server.feedRtsysR<tmako.exceptionsRt mako.lookupt ImportErrortstderrtexitR3R RRR!R'RP(((s5/usr/lib/python2.6/vendor-packages/pkg/server/face.pyts*