chiark / gitweb /
make-secnet-sites: Tolerate missing group in userv sites file
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Mar 2020 18:26:16 +0000 (18:26 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Mar 2020 18:31:32 +0000 (18:31 +0000)
When processing a sites file fragment via userv, the group in the
provided file is supposed to be optional.  This was accidentally
regressed in 19482a2958fa
   make-secnet-sites: Do not write out unchecked output in sites

The additional call to w[2].groupname ought to have been conditional.
Now we have precisely the right code in OpBase, so simply call it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
make-secnet-sites

index 0520486..85ee7a8 100755 (executable)
@@ -375,7 +375,7 @@ class OpUserv(OpBase):
                        sys.exit(1)
        def check_group(self,group,w):
                if group!=self.group: complain("Incorrect group!")
-               w[2].groupname()
+               OpBase.check_group(self,group,w)
        def read_in(self):
                self.headerinput=pfilepath(self.header,allow_include=True)
                self.userinput=sys.stdin.readlines()