mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 04:57:54 +00:00
more assert
This commit is contained in:
parent
cb065aefbd
commit
4d779cfe07
@ -466,7 +466,9 @@ def create_grid_manager_verifier(keys, certs, public_key, now_fn=None, bad_cert=
|
||||
now = now_fn()
|
||||
for cert in valid_certs:
|
||||
expires = datetime.utcfromtimestamp(cert['expires'])
|
||||
if cert['public_key'] == public_key:
|
||||
pc = cert['public_key'].encode('ascii')
|
||||
assert type(pc) == type(public_key), "{} isn't {}".format(type(pc), type(public_key))
|
||||
if pc == public_key:
|
||||
if expires > now:
|
||||
# not-expired
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user