66 return None
67
68 def get_profile(self, username):
69 if not username or not username in aj.users.data['users']: 70 return {}
71 return aj.users.data['users'][username]
72
11 def verify(self, x509):
12 serial = x509.get_serial_number()
13 digest = x509.digest('sha256')
14 if not b'sha256' in x509.get_signature_algorithm():15 logging.warning(
16 f'Sha1 digest algorithm is deprecated,'
17 f'you should revoke the client certificate with serial {serial}'
Tests for membership should use the form x not in the_list
rather than not x in the_list
. The former example is simply more readable.
if not x in authors:
authors.append(x)
if x not in authors:
authors.append(x)