Merge "Account for secret.created possibly being None"

This commit is contained in:
Zuul 2024-10-07 12:01:53 +00:00 committed by Gerrit Code Review
commit 64409aca23

View File

@ -547,6 +547,8 @@ class BarbicanKeyManager(key_manager.KeyManager):
time_stamp = timeutils.parse_isotime( time_stamp = timeutils.parse_isotime(
str(secret.created)).timetuple() str(secret.created)).timetuple()
created = calendar.timegm(time_stamp) created = calendar.timegm(time_stamp)
else:
created = None
if issubclass(secret_type, key_base_class.Key): if issubclass(secret_type, key_base_class.Key):
return secret_type(algorithm=secret.algorithm, return secret_type(algorithm=secret.algorithm,