Skip to content

Commit 3681591

Browse files
committed
minor filehandle checking bug
1 parent 3cd23c1 commit 3681591

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hubblestack/utils/signing.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,10 @@ def read_certs(*fnames):
203203

204204
def stringify_cert_files(cert):
205205
"""this function returns a string version of cert(s) for returner"""
206-
if type(cert) is list and len(cert) >= 1:
206+
if isinstance(cert, (tuple,list)) and cert:
207207
return ', '.join([str(c) for c in cert])
208-
elif type(cert) is file:
208+
elif hasattr(cert, 'name'):
209+
# probably a file handle
209210
return cert.name
210211
return str(cert)
211212

0 commit comments

Comments
 (0)