chiark / gitweb /
systemd-python: Journal convert_unicode exception handling change
authorSteven Hiscocks <steven@hiscocks.me.uk>
Tue, 19 Feb 2013 20:37:55 +0000 (20:37 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 22 Feb 2013 15:57:44 +0000 (16:57 +0100)
Rather than catch all, is now limited to UnicodeDecodeError

src/python-systemd/journal.py

index d61c30e1244c825ac3054443fbeb82cf52713963..5c5f5ca05b50883d7d8e9eeffddc085d621eccb4 100644 (file)
@@ -113,7 +113,7 @@ class Journal(_Journal):
             # Default conversion in unicode
             try:
                 result = _convert_unicode(value)
             # Default conversion in unicode
             try:
                 result = _convert_unicode(value)
-            except:
+            except UnicodeDecodeError:
                 # Leave in default bytes
                 result = value
         return result
                 # Leave in default bytes
                 result = value
         return result