Skip to content

Commit 9d21002

Browse files
committed
temp: pylint fixes
1 parent d608aed commit 9d21002

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

xmodule/video_block/transcripts_utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from django.core.exceptions import ObjectDoesNotExist
1919
from lxml import etree
2020
from opaque_keys.edx.keys import UsageKeyV2
21-
from openedx_learning.api import authoring
2221
from pysrt import SubRipFile, SubRipItem, SubRipTime
2322
from pysrt.srtexc import Error
2423

@@ -1108,7 +1107,7 @@ def get_transcript_from_learning_core(video_block, language, output_format, tran
11081107
# We want to standardize on .srt
11091108
raise NotFoundError(
11101109
"Video XBlocks in Content Libraries only support storing .srt "
1111-
f"transcript files, but we tried to look up {path_file} for {usage_key}"
1110+
f"transcript files, but we tried to look up {file_path} for {usage_key}"
11121111
)
11131112

11141113
# TODO: There should be a Learning Core API call for this:
@@ -1122,11 +1121,11 @@ def get_transcript_from_learning_core(video_block, language, output_format, tran
11221121
.content
11231122
)
11241123
data = content.read_file().read()
1125-
except ObjectDoesNotExist:
1124+
except ObjectDoesNotExist as exc:
11261125
raise NotFoundError(
11271126
f"No file {file_path} found for {usage_key} "
11281127
f"(ComponentVersion {component_version.uuid})"
1129-
)
1128+
) from exc
11301129

11311130
# Now convert the transcript data to the requested format:
11321131
output_filename = f'{file_path.stem}.{output_format}'

0 commit comments

Comments
 (0)