mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1729481: Fix a bug in the python-version hacks r=jewilde
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
This commit is contained in:
parent
1fb918261c
commit
6fd44d8476
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user