Revision 38552c68 snf-image-helper/decode-properties.py
b/snf-image-helper/decode-properties.py | ||
---|---|---|
46 | 46 |
for key, value in properties.items(): |
47 | 47 |
os.environ['SNF_IMAGE_PROPERTY_' + key] = value |
48 | 48 |
|
49 |
output = StringIO(subprocess.check_output(['bash', '-c', 'set'])) |
|
49 |
p = subprocess.Popen(['bash', '-c', 'set'], stdout=subprocess.PIPE) |
|
50 |
output = StringIO(p.communicate()[0]); |
|
50 | 51 |
for line in iter(output): |
51 | 52 |
if line.startswith('SNF_IMAGE_PROPERTY_'): |
52 |
outfh.write(line) |
|
53 |
outfh.write('export ' + line)
|
|
53 | 54 |
|
54 | 55 |
infh.close() |
55 | 56 |
outfh.close() |
Also available in: Unified diff