Skip to content

Commit

Permalink
[gyb] Add __file__ binding
Browse files Browse the repository at this point in the history
  • Loading branch information
rintaro committed Jun 15, 2016
1 parent eadc7aa commit 9e10ce0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ def execute(self, context):
save_children = context.local_bindings.get('__children__')
# Execute the code with our __children__ in scope
context.local_bindings['__children__'] = self.children
context.local_bindings['__file__'] = self.filename
result = eval(self.code, context.local_bindings)

if context.local_bindings['__children__'] is not self.children:
Expand Down

0 comments on commit 9e10ce0

Please sign in to comment.