Skip to content

xr.py check_config() doing a wrong type check #93

@oranima

Description

@oranima

check_config() function in set_json() under xr.py contains some bugs.
see below what should be changed

    def check_configs(name, configs):

[-] if isinstance(name, string_types):
[+] if isinstance(configs, string_types):
...
[-] elif isinstance(name, dict):
[+] elif isinstance(configs, dict):

name is indeed always a string as the function is called with
lines 188,189
updates = create_updates("update_json_configs", update_json_configs)
replaces = create_updates("replace_json_configs", replace_json_configs)
line 155
configs = check_configs(name, configs)

The test should be checked against configs which it the variable containing the actual config and which should be either a string, a dict or an iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions