mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 06:04:15 +00:00
Also catch ValueError when converting timestamp to datetime (#1329)
This commit is contained in:
parent
e3d90a5945
commit
654ed506f4
1 changed files with 1 additions and 1 deletions
|
@ -329,7 +329,7 @@ def toDatetime(value, format=None):
|
|||
return None
|
||||
try:
|
||||
return datetime.fromtimestamp(value)
|
||||
except (OSError, OverflowError):
|
||||
except (OSError, OverflowError, ValueError):
|
||||
try:
|
||||
return datetime.fromtimestamp(0) + timedelta(seconds=value)
|
||||
except OverflowError:
|
||||
|
|
Loading…
Reference in a new issue