mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1378410 - 2a. Expose set
to moz.build sandbox; r=gps
To construct an empty set, we need to use the `set()` notation. In order to do that, we need to expose `set` to the moz.build sandbox. MozReview-Commit-ID: DMyKnF0FEx2 --HG-- extra : rebase_source : 5cfe8080ec333a1eca70cd3edba2aaaff6406820
This commit is contained in:
parent
f0ca31be3a
commit
c3c2bfc408
@ -34,10 +34,10 @@ The following properties make execution of ``moz.build`` files special:
|
||||
files.
|
||||
|
||||
The limited subset of Python is actually an extremely limited subset.
|
||||
Only a few symbols from ``__builtins__`` are exposed. These include
|
||||
``True``, ``False``, and ``None``. Global functions like ``import``,
|
||||
``print``, and ``open`` aren't available. Without these, ``moz.build``
|
||||
files can do very little. *This is by design*.
|
||||
Only a few symbols from ``__builtin__`` are exposed. These include
|
||||
``True``, ``False``, ``None``, ``sorted``, ``int``, and ``set``. Global
|
||||
functions like ``import``, ``print``, and ``open`` aren't available.
|
||||
Without these, ``moz.build`` files can do very little. *This is by design*.
|
||||
|
||||
The execution sandbox treats all ``UPPERCASE`` variables specially. Any
|
||||
``UPPERCASE`` variable must be known to the sandbox before the script
|
||||
|
@ -110,6 +110,7 @@ class Sandbox(dict):
|
||||
'True': True,
|
||||
'sorted': alphabetical_sorted,
|
||||
'int': int,
|
||||
'set': set,
|
||||
})
|
||||
|
||||
def __init__(self, context, builtins=None, finder=default_finder):
|
||||
|
Loading…
Reference in New Issue
Block a user