Hello, Am Dienstag, 9. Juli 2013 schrieb Kshitij Gupta: > >> I somehow doubt this is intentional - the test should catch this > >> exception ;-) > > As it turns this issue has got something to do with the Python3's new > feature called Exception Chaining. > Its another of those Python2-3 problem. > An additional line needs to be incorporated to check if Python2 or 3 > and raise accordingly. :/
:-( > > It was inside the try except block of test, I got it out to try how > > exception looked. > > Turns out \n\t aren't working yet. :-\ > > > >> Also note that the last line contains \n\t - this should become a > >> real line break and tab in the output... > > I did not notice until later, but the AppArmorException uses repr() to > print the description and hence its not possible to print the nicely > formatted exception with the line number in new line. I noticed you removed repr() in r16 - does this fix the issue? (a short test tells me the answer is probably "no") > I feel I should use the error(), it will print something like this and > terminate program: > > ERROR: No severity value present in file: severity_broken.db > [Line 14]: CAP_SYS_MODULE > What would you say? move to error() instead of raising > AppArmorException? Can error() be catched with try/except like an exception? For example, we'll need this to display a nice error dialog in YaST. (If yes, then using error() is OK.) Regards, Christian Boltz -- The normal user is happy with openSUSE because: [...] - openSUSE isn't a religion (like a few others); What users blame us is for lack of customization :) [Nelson Marques in opensuse-factory] -- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor