We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd033a9 commit 25c6190Copy full SHA for 25c6190
plexapi/utils.py
@@ -176,7 +176,11 @@ def toDatetime(value, format=None):
176
"""
177
if value and value is not None:
178
if format:
179
- value = datetime.strptime(value, format)
+ try:
180
+ value = datetime.strptime(value, format)
181
+ except ValueError:
182
+ # parsing failed
183
+ return None
184
else:
185
# https://bugs.python.org/issue30684
186
# And platform support for before epoch seems to be flaky.
0 commit comments