Spaces:
Runtime error
Runtime error
Fix WebVTT ingestion when file does not specify start time
Browse files
src/ctp_slack_bot/models/webvtt.py
CHANGED
|
@@ -77,7 +77,7 @@ class WebVTTContent(Content):
|
|
| 77 |
for result
|
| 78 |
in map(ISO_DATE_TIME_PATTERN.findall, web_vtt.header_comments)
|
| 79 |
if result)
|
| 80 |
-
except ValueError:
|
| 81 |
return None
|
| 82 |
|
| 83 |
@classmethod
|
|
|
|
| 77 |
for result
|
| 78 |
in map(ISO_DATE_TIME_PATTERN.findall, web_vtt.header_comments)
|
| 79 |
if result)
|
| 80 |
+
except (StopIteration, ValueError):
|
| 81 |
return None
|
| 82 |
|
| 83 |
@classmethod
|