From d72abf73b95fc7574bbd06e500afabf9cc4acae3 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Tue, 28 Nov 2023 10:20:01 -0500 Subject: [PATCH] Remove redundant `ensure_datetime()` call `mtime` is already a `datetime`. --- dandi/download.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dandi/download.py b/dandi/download.py index f9cd05167..30c896042 100644 --- a/dandi/download.py +++ b/dandi/download.py @@ -750,9 +750,9 @@ def _download_file( } # TODO: dissolve attrs and pass specific mtime? - if mtime: + if mtime is not None: yield {"status": "setting mtime"} - os.utime(path, (time.time(), ensure_datetime(mtime).timestamp())) + os.utime(path, (time.time(), mtime.timestamp())) yield {"status": "done"}