Skip to content

Commit 2227d9e

Browse files
fix: add from ex in raise instead of disabling the lint
1 parent fb31125 commit 2227d9e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cms/djangoapps/contentstore/git_export_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ def export_to_git(context_key, repo, user='', rdir=None):
170170
# V1 libraries and courses: use XML export (no user parameter)
171171
content_export_func(modulestore(), contentstore(), context_key,
172172
root_dir, content_dir)
173-
except (OSError, AttributeError):
173+
except (OSError, AttributeError) as ex:
174174
log.exception('Failed to export %s', content_type_label)
175-
raise GitExportError(GitExportError.XML_EXPORT_FAIL) # lint-amnesty, pylint: disable=raise-missing-from # noqa: B904
175+
raise GitExportError(GitExportError.XML_EXPORT_FAIL) from ex
176176

177177
# Get current branch if not already set
178178
if not branch:

0 commit comments

Comments
 (0)