Skip to content

Commit

Permalink
Apply linter
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed May 12, 2024
1 parent 60891a3 commit e8cd5f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gdown/download.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import email.utils as eutils
import email.utils
import os
import os.path as osp
import re
Expand Down Expand Up @@ -76,15 +76,16 @@ def _get_filename_from_response(response):

return None


def _get_modified_time_from_response(response):
if "Last-Modified" not in response.headers:
return None

raw = response.headers["Last-Modified"]
if raw is None:
return None
return eutils.parsedate_to_datetime(raw)

return email.utils.parsedate_to_datetime(raw)


def _get_session(proxy, use_cookies, user_agent, return_cookies_file=False):
Expand Down

0 comments on commit e8cd5f9

Please sign in to comment.