When processing a sites file other than via userv, the group (if
specified) is not of any interest.
But since tainting, we need to bless it for re-output. (This is
necessary even in modes where we don't actually write anything out,
like .conf generation.)
The correct place to do this is in OpConf's base class.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
class OpBase():
# Base case is reading a sites file from self.inputfilee.
# And writing a sites file to self.sitesfile.
+ def check_group(self,group,w):
+ if len(w) >= 3:
+ w[2].groupname()
def positional_args(self, av):
if len(av.arg)>3:
print("Too many arguments")
class OpConf(OpBase):
opts = ['--conf']
help = 'sites.conf generation mode (default)'
- def check_group(self,group,w): pass
def write_out(self):
if self.outputfile is None:
of=sys.stdout