Skip to content

Commit 7f3b15e

Browse files
author
Jussi Kukkonen
authored
Merge pull request #1432 from avelichka/develop
Stop using formats.py in metadata.py
2 parents 0b54caf + 4e8a0fe commit 7f3b15e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tuf/api/metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from securesystemslib.storage import FilesystemBackend, StorageBackendInterface
2626
from securesystemslib.util import persist_temp_file
2727

28-
from tuf import exceptions, formats
28+
from tuf import exceptions
2929
from tuf.api.serialization import (
3030
MetadataDeserializer,
3131
MetadataSerializer,
@@ -384,7 +384,7 @@ def _common_fields_from_dict(
384384
# Convert 'expires' TUF metadata string to a datetime object, which is
385385
# what the constructor expects and what we store. The inverse operation
386386
# is implemented in '_common_fields_to_dict'.
387-
expires = formats.expiry_string_to_datetime(expires_str)
387+
expires = datetime.strptime(expires_str, "%Y-%m-%dT%H:%M:%SZ")
388388
return version, spec_version, expires
389389

390390
def _common_fields_to_dict(self) -> Dict[str, Any]:

0 commit comments

Comments
 (0)