Skip to content

Commit

Permalink
Remove redundant ensure_datetime() call
Browse files Browse the repository at this point in the history
`mtime` is already a `datetime`.
  • Loading branch information
jwodder committed Nov 28, 2023
1 parent 0971d02 commit d72abf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dandi/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

Expand Down

0 comments on commit d72abf7

Please sign in to comment.