chiark / gitweb /
make-secnet-sites: Fix error handling if caller is in wrong group
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Mar 2020 18:16:44 +0000 (18:16 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Mar 2020 18:17:42 +0000 (18:17 +0000)
We would crash with an unbound variable error, instead of the right
error message.

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

index 70fa7a4b9dd7483dc78b3612dd6e25b04fa65c60..13a6c04b7fbd77d5860b243ca467f0171ff99d28 100755 (executable)
@@ -369,7 +369,7 @@ class OpUserv(OpBase):
                for i in ugs.split():
                        if self.group==i: ok=1
                if not ok:
                for i in ugs.split():
                        if self.group==i: ok=1
                if not ok:
-                       print("caller not in group %s"%group)
+                       print("caller not in group %s"%self.group.groupname())
                        sys.exit(1)
        def check_group(self,group,w):
                if group!=self.group: complain("Incorrect group!")
                        sys.exit(1)
        def check_group(self,group,w):
                if group!=self.group: complain("Incorrect group!")