console: fix namespace problems when using slapos console with scripts
When using slapos console on scripts defining functions, for example ```py def my_request(*args, **kw): ... return request(*args, **kw) ``` the global names such as `request` where no longer available in the namespace of the function, because of a wrong usage of exec regarding locals/globals. Co-authored-by: Kirill Smelkov <kirr@nexedi.com>
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
failed |
#542129
external
|
SlapOS-Master.UnitTest-Master |
03:06:51
|
||||||
passed |
#542162
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:12:32
|
||||||
passed |
#542149
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:13:40
|
||||||
failed |
#541992
external
retried
|
SlapOS-Master.UnitTest-Master |
03:10:28
|
||||||
failed |
#542126
external
retried
|
SlapOS-Master.UnitTest-Master |
00:28:16
|
||||||
failed |
#542028
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:13:13
|
||||||
failed |
#542096
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:14:30
|
||||||
failed |
#541996
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:13:17
|
||||||
passed |
#542005
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:16:30
|
||||||
passed |
#542043
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:15:02
|
||||||
passed |
#542083
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:15:28
|
||||||