chiark / gitweb /
make-secnet-sites: Fix error handling if caller is in wrong group
[secnet.git] / make-secnet-sites
index a84479ca0ce2fc41939d0c73d3e50721aa57bbb0..13a6c04b7fbd77d5860b243ca467f0171ff99d28 100755 (executable)
@@ -369,7 +369,7 @@ class OpUserv(OpBase):
                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!")
@@ -591,10 +591,10 @@ class rsakey (pubkey):
                self.n=w[3].bignum_10('rsa','rsa n')
                if len(w) >= 5: w[4].email()
                self.a='rsa1'
-               self.d=base91s_encode(b'%d %s %s' %
-                                     (self.l,
-                                      self.e.encode('ascii'),
-                                      self.n.encode('ascii')))
+               self.d=base91s_encode(('%d %s %s' %
+                                      (self.l,
+                                       self.e,
+                                       self.n)).encode('ascii'))
                # ^ this allows us to use the pubkey.forsites()
                # method for output in versions>=2
        def __str__(self):