[apparmor] [PATCH 2/2] Add JSON interface to UI_Changes
Christian Boltz
apparmor at cboltz.de
Thu Oct 26 11:55:17 UTC 2017
Hello,
Am Donnerstag, 26. Oktober 2017, 13:50:20 CEST schrieb Christian Boltz:
> + json_response('changes')["response"] # wait for it to delay deletion of difftemp (and ignore response content)
That's what I get for rewording the comment - s/ it / response /
so v2 of this simple patch is:
=== modified file 'utils/apparmor/ui.py'
--- utils/apparmor/ui.py 2017-10-25 22:36:48 +0000
+++ utils/apparmor/ui.py 2017-10-26 11:52:45 +0000
@@ -45,7 +45,7 @@
def set_json_mode():
global UI_mode
UI_mode = 'json'
- jsonout = {'dialog': 'apparmor-json-version', 'data': '2.13'}
+ jsonout = {'dialog': 'apparmor-json-version', 'data': '2.12'}
write_json(jsonout)
# reads the response on command line for json and verifies the response
@@ -257,7 +257,7 @@
if UI_mode == 'json':
jsonout = {'dialog': 'changes', 'header':header, 'filename': difftemp.name}
write_json(jsonout)
- json_response('changes')["response"] # response gets ignored, therefore not assigning to a variable
+ json_response('changes')["response"] # wait for response to delay deletion of difftemp (and ignore response content)
else:
subprocess.call('less %s' % difftemp.name, shell=True)
difftemp.close()
Regards,
Christian Boltz
--
Wer etwas "Narrensicher" nennt, unterschätzt die Narren.
[Ratti in suse-linux]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20171026/ca8549c2/attachment.sig>
More information about the AppArmor
mailing list