Skip to content

Commit 60489c8

Browse files
committed
try to prevent logging related error
1 parent 41fa0a2 commit 60489c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hubblestack/utils/signing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def verify_signature(fname, sfname, public_crt='public.crt', ca_crt='ca-root.crt
467467
return STATUS.VERIFIED if both the signature and the CA sig match
468468
"""
469469
log_level = log.debug
470-
short_fname = fname.split('/')[-1]
470+
short_fname = fname.split('/')[-1] if fname else 'n/a'
471471
try:
472472
with open(sfname, 'r') as fh:
473473
sig,_,_ = PEM.decode(fh.read()) # also returns header and decrypted-status

0 commit comments

Comments
 (0)