Newlookwithoutssl

using submodule without the need of adding apache ssi to the cgi scripts
done added add_virtual headers within the sambawebfileload


On Tue, Aug 5, 2014 at 6:39 AM, Jelmer Vernooij <notifications@github.com>
wrote:

> In buildfarm/util.py:
>
> > +    text = re.sub('href="/samba', 'href="http://www.samba.org/samba
> ', text)
> > +    return text
> > +
> > +class Sitemap(object):
> > +
> > +    def __init__(self, webdir):
> > +        self.webdir = webdir
> > +
> > +    def file_load(self, filename):
> > +        self.filename = os.path.join(self.webdir, filename)
> > +        f = open(self.filename, 'r')
> > +        try:
> > +            text = f.read()
> > +        finally:
> > +            f.close()
> > +        text = re.sub('<!--#include virtual="/samba/(.*)" -->', self.add_virtual_headers, text)
>
> It seems like this should just be a function with a nested function
> "add_virtual_headers" rather than a class, since there's nothing
> particularly in the class.
>
> In fact, you could also make SambaWebFileLoad take two arguments: a webdir
> and a filename.
>
> In that case, you could replace self.add_virtual_headers here with "lambda
> filename: SambaWebFileLoad(webdir, m.group(1))".
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jelmer/build-farm/pull/10/files#r15790920>.
>



-- 
krishna teja perannagari