Page MenuHomePhabricator

get_config_dict is failing when the configuration section is empty/missing
Open, Requires assessmentPublicBUG

Description

in order to safely call get_config_dict, config.exists or config.exists_effective need to be called beforehand.

The reason is that the underlying command run will return "Configuration under specified path is empty\n" when the configuration does not exist.
Ideally, this "barrier" call should not be required and the code should be able to detect that failure.

it was suggested that cli-shell-api could provide an error code when the section is missing allowing to detect it occurred.

Details

Difficulty level
Easy (less than an hour)
Version
1.3-rolling-202002102200
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Related Objects