summaryrefslogtreecommitdiff
path: root/src/fstab-generator/fstab-generator.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-06 22:15:46 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-07 00:45:56 -0500
commitaaf080611894aa70af421380af3bca23ad998a8d (patch)
tree8c5baaf6b9b117ee1a4a3c7f65163c8dff37373d /src/fstab-generator/fstab-generator.c
parent1d98d9a62c16c8282d02942d80e025ceec962c9b (diff)
systemd-python: catch only ValueErrors in conversion code
First of all, 'try: ... except: ...' (with no exception specified) is always a no-no, since it catches all BaseExceptions, which includes ^C and other stuff which should almost never be caught. Now the conversion is stricter, and only one conversion is attempted, and only a ValueEror is caught. It seems reasonable to catch ValueErrors, since the entries in the journal are not verified, and any erroneous application might log a field which cannot be converted. The consumer of events must only check if a field is an instance of bytes and can otherwise assume that the conversion was performed correctly. Order of arguments in Reader.__init__ has been changed to match order in _Reader.__init__. Conversions have been updated to work under Python 2 and 3.
Diffstat (limited to 'src/fstab-generator/fstab-generator.c')
0 files changed, 0 insertions, 0 deletions