mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Make importlib.test.source.util.write_bytecode reset sys.dont_write_bytecode.
This commit is contained in:
parent
e866206302
commit
f2b55fb5ee
1 changed files with 5 additions and 1 deletions
|
@ -14,7 +14,11 @@ def writes_bytecode(fxn):
|
|||
if sys.dont_write_bytecode:
|
||||
return lambda *args, **kwargs: None
|
||||
else:
|
||||
return fxn
|
||||
def wrapper(*args, **kwargs):
|
||||
to_return = fxn(*args, **kwargs)
|
||||
sys.dont_write_bytecode = False
|
||||
return to_return
|
||||
return wrapper
|
||||
|
||||
|
||||
def bytecode_path(source_path):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue