Skip to content

Commit

Permalink
Bug 1729481: Fix a bug in the python-version hacks r=jewilde
Browse files Browse the repository at this point in the history
I was checking if the caller was 'log' but that wasn't correct
because we pass the result of the function to log, we don't call
it from log

Differential Revision: https://phabricator.services.mozilla.com/D124939
  • Loading branch information
tomrittervg committed Sep 20, 2021
1 parent c2a4748 commit a758caf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Empty file.
7 changes: 5 additions & 2 deletions python/mozbuild/mozbuild/vendor/rewrite_mozbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,13 @@ def ast_get_source_segment(code, node):
):
return ast.original_get_source_segment(code, node)

if caller.function == "log":
if caller.function == "assignment_node_to_source_filename_list":
return ""

raise Exception("ast_get_source_segment is not available with this Python version.")
raise Exception(
"ast_get_source_segment is not available with this Python version. (ver=%s.%s, caller=%s)"
% (sys.version_info.major, sys.version_info.minor, caller.function)
)


# Overwrite it so we don't accidently use it
Expand Down

0 comments on commit a758caf

Please sign in to comment.