On Mon, Feb 24, 2014 at 07:58:57PM +0100, Christian Boltz wrote: > Hello, > > this patch fixes two (unrelated) issues in common.py: > - it adds some debug logging in valid_path() > - it fixes a py2 incompability in DebugLogger.__init__ > > > === modified file 'utils/apparmor/common.py' > --- utils/apparmor/common.py 2014-02-12 23:54:00 +0000 > +++ utils/apparmor/common.py 2014-02-24 18:55:21 +0000 > @@ -112,6 +112,7 @@ > return False > > if '"' in path: # We double quote elsewhere > + debug("%s (contains quote)" % (m)) > return False > > try: > @@ -228,7 +229,7 @@ > try: > logging.basicConfig(filename=self.logfile, > level=self.debug_level, > format='%(asctime)s - %(name)s - > %(message)s\n') > - except OSError: > + except IOError:
Does logging in python3 throw an OSError? Perhaps 'except (IOError, OSError)' which will catch either exception class would be better? -- Steve Beattie <sbeat...@ubuntu.com> http://NxNW.org/~steve/
signature.asc
Description: Digital signature
-- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor