Bug 8452 - hiveconf getters raise exceptions for empty values
Summary: hiveconf getters raise exceptions for empty values
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: ---
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-20 09:01 CET by Samuel Mannehed
Modified: 2024-11-20 09:21 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Samuel Mannehed cendio 2024-11-20 09:01:58 CET
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.

Note You need to log in before you can comment on or make changes to this bug.