Given a hiveconf parameter that is configured like this: > [/my/empty/] > param= When the code uses get_integer() with the default value of 0: > param = self.hive.get_integer("/my/empty/param", 0) .. it will give a BadIntegerFormat error: > File "/opt/thinlinc/modules/thinlinc/hiveconf.py", line 221, in get_integer > raise BadIntegerFormat() > thinlinc.hiveconf.BadIntegerFormat It feels like the sane approach would simply be to return the default value.
An empty value for an integer field is likely an error, so it might be dangerous to just silently ignore that. This is part of a more general issue of how we should deal with bad configuration. This is something that needs to be dealt with on a higher level where we have more information on how crucial a setting is, and if we can fall back to something else or not.