If I modify the postinst with set -x, I'm able to see that the traceback is from this:
+ /usr/bin/python3 -c
import os
import json
from uaclient.config import UAConfig
cfg = UAConfig()
status = cfg.read_cache('status-cache')
if status:
for service in status['services']:
if service['name'] == 'esm-apps': print(service['status'])
Traceback (most recent call last):
File "<string>", line 10, in <module>
KeyError: 'status'
If I modify the postinst with set -x, I'm able to see that the traceback is from this:
+ /usr/bin/python3 -c cache(' status- cache')
print( service[ 'status' ])
import os
import json
from uaclient.config import UAConfig
cfg = UAConfig()
status = cfg.read_
if status:
for service in status['services']:
if service['name'] == 'esm-apps':
Traceback (most recent call last):
File "<string>", line 10, in <module>
KeyError: 'status'