runpromises: support software releases older than slapos 1.0.118
Before slapos commit a184cca8b (Try to reuse existing file to avoid excessive IO on update + other minor optimisations, 2019-06-17), which started to be used in profiles in 65acdca0d (Release slapos.cookbook (1.0.118), 2019-08-13), the promise plugins did not contain import sys sys.path[0:0] = (..., ) but there was an extra import statement: import sys import json sys.path[0:0] = (..., ) slapos.core >= 1.7 was not able to process such promises, because the code introspecting these promises assumed that the second node of the AST was the assignment, which is incorrect in the old promises because it was another import. To accomodate both cases, use the value from the first assignment. We also change to use ast.literal_eval for safety.
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
passed |
#340813
external
|
SlapOS.Eggs.UnitTest-Jerome.Python2 |
00:13:45
|
||||||
passed |
#340819
external
|
SlapOS.Eggs.UnitTest-Jerome.Python3 |
00:15:37
|
||||||
running |
#340858
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
24324:18:10 |
||||||
running |
#340860
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
24324:18:08 |
||||||
passed |
#340694
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python2 |
00:12:32
|
||||||
passed |
#340737
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python2 |
00:13:36
|
||||||
passed |
#340586
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python2 |
00:13:32
|
||||||
passed |
#340783
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python2 |
00:13:30
|
||||||
passed |
#340648
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python2 |
00:12:26
|
||||||
passed |
#340789
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python3 |
00:16:55
|
||||||
passed |
#340653
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python3 |
00:13:27
|
||||||
passed |
#340675
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python3 |
00:13:04
|
||||||
passed |
#340740
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python3 |
00:13:23
|
||||||
passed |
#340583
external
retried
|
SlapOS.Eggs.UnitTest-Jerome.Python3 |
00:13:14
|
||||||