Skip to content

Commit

Permalink
Remove undeclared dependency on dateutil
Browse files Browse the repository at this point in the history
With version 2020.12.0 users were reporting an issue with 'dateutil' module. The dependency on this undeclared module has been removed.
  • Loading branch information
Screwdgeh committed Dec 19, 2020
1 parent 9965c12 commit 9d1bc52
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/samsungtv_tizen/media_player.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Support for interface with an Samsung TV."""
import asyncio
from datetime import timedelta, datetime
from dateutil.parser import parse as parsedate
import logging
import socket
import json
Expand Down Expand Up @@ -624,7 +623,7 @@ def _ensure_latest_path_file(self):
if file_date < (datetime.now().astimezone()-timedelta(days=MEDIA_FILE_DAYS_BEFORE_UPDATE)):
try:
response = requests.head(MEDIA_IMAGE_BASE_URL + "logo_paths.json")
url_date = parsedate(response.headers.get("Last-Modified")).astimezone()
url_date = datetime.strptime(response.headers.get("Last-Modified"),'%a, %d %b %Y %X %Z').astimezone()
if url_date > file_date:
self._download_latest_path_file()
except:
Expand Down

0 comments on commit 9d1bc52

Please sign in to comment.