2020-03-10, 11:25 AM
Hi Sailoog,
thnk you very much.
I have add it and it works.
I have a further Problem.
You do this to add the app to the config:
If there is an empty string in the config (normaly if you do not have add an app) The try braks off and the app should not added to the config.
Should i add an handle for if string is not empty?
because eval("") =>SyntaxError: unexpected EOF while parsing
thnk you very much.
I have add it and it works.
I have a further Problem.
You do this to add the app to the config:
Code:
try:
externalApps0 = eval(conf2.get('APPS', 'external_apps'))
externalApps1 = []
for i in externalApps0:
if i['package'] != package: externalApps1.append(i)
externalApps1.append(app)
conf2.set('APPS', 'external_apps', str(externalApps1))
print(_('DONE'))
except Exception as e: print(_('FAILED: ')+str(e))
If there is an empty string in the config (normaly if you do not have add an app) The try braks off and the app should not added to the config.
Should i add an handle for if string is not empty?
because eval("") =>SyntaxError: unexpected EOF while parsing