]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
addons: batman_adv: drop unnecessary exception clause
authorMarkus Hauschild <markus@moepman.eu>
Thu, 19 Nov 2020 08:15:15 +0000 (09:15 +0100)
committerMarkus Hauschild <markus@moepman.eu>
Thu, 19 Nov 2020 08:15:15 +0000 (09:15 +0100)
The exception could have never come from read_file_oneline, also value
was an undefined variable, so it would have thrown an exception while
handling an exception thus being useless anyway.

Signed-off-by: Markus Hauschild <markus@moepman.eu>
ifupdown2/addons/batman_adv.py

index c256d2bba4c1b09fbfb9d2527132e4a10742e987..fc8b74f8673a3573fdc3bc9816c09a75c2703301 100644 (file)
@@ -138,8 +138,6 @@ class batman_adv(Addon, moduleBase):
             return self.read_file_oneline(attr_file_path)
         except IOError as i:
             raise Exception("_read_current_batman_attr (%s) %s" % (attr, i))
-        except ValueError:
-            raise Exception("_read_current_batman_attr: Integer value expected, got: %s" % value)
 
     def _set_batman_attr(self, ifaceobj, attr, value):
         if attr not in self._batman_attrs: