<p dir="ltr"><br>
On Feb 25, 2014 12:47 AM, "Steve Beattie" <<a href="mailto:steve@nxnw.org">steve@nxnw.org</a>> wrote:<br>
><br>
> On Mon, Feb 24, 2014 at 07:58:57PM +0100, Christian Boltz wrote:<br>
> > Hello,<br>
> ><br>
> > this patch fixes two (unrelated) issues in common.py:<br>
> > - it adds some debug logging in valid_path()<br>
> > - it fixes a py2 incompability in DebugLogger.__init__<br>
> ><br>
> ><br>
> > === modified file 'utils/apparmor/common.py'<br>
> > --- utils/apparmor/common.py 2014-02-12 23:54:00 +0000<br>
> > +++ utils/apparmor/common.py 2014-02-24 18:55:21 +0000<br>
> > @@ -112,6 +112,7 @@<br>
> > return False<br>
> ><br>
> > if '"' in path: # We double quote elsewhere<br>
> > + debug("%s (contains quote)" % (m))<br>
> > return False<br>
> ><br>
> > try:<br>
> > @@ -228,7 +229,7 @@<br>
> > try:<br>
> > logging.basicConfig(filename=self.logfile, level=self.debug_level,<br>
> > format='%(asctime)s - %(name)s - %(message)s\n')<br>
> > - except OSError:<br>
> > + except IOError:<br>
><br>
> Does logging in python3 throw an OSError? Perhaps 'except (IOError,<br>
> OSError)' which will catch either exception class would be better?<br>
><br>
><br>
Python 3 merged OSError and IOError ( they changed the exception hierarchy). So IOError works for both.</p>
<p dir="ltr">Acked-by: Kshitij Gupta<br>
@cboltz:<br>
Please commit the patch. :)</p>
<p dir="ltr">> --<br>
> Steve Beattie<br>
> <<a href="mailto:sbeattie@ubuntu.com">sbeattie@ubuntu.com</a>><br>
> <a href="http://NxNW.org/~steve/">http://NxNW.org/~steve/</a><br>
><br>
> --<br>
> AppArmor mailing list<br>
> <a href="mailto:AppArmor@lists.ubuntu.com">AppArmor@lists.ubuntu.com</a><br>
> Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/apparmor">https://lists.ubuntu.com/mailman/listinfo/apparmor</a><br>
><br>
</p>