Alternative approach to solve:
- If one of the "[host]" in the configuration file omit the "interval" entry,
the application uses the next "[host]"'s "interval" entry, instead of a
default value. The problem is specific to the configuration read classes
that are not smart enough to verify which "[host]" have this entry and which
don't.
Example:
[host]
name=A
[host]
name=B
interval=1
[host]
name=C
interval=3
Thus, the tuples will be (A,1) , (B,3), (C,?), but A should have a default
value, instead of borrow B's value.
The approach consists of ensure the program only runs if there is an interval
for every single host.