Skip to content

Commit

Permalink
Merge pull request #1367 from dandi/already-datetime
Browse files Browse the repository at this point in the history
Remove redundant `ensure_datetime()` call
  • Loading branch information
yarikoptic authored Nov 28, 2023
2 parents 6f18a4b + d72abf7 commit eea1411
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 @@ -749,9 +749,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 eea1411

Please sign in to comment.