Skip to content

Config Key normalization #2285

@martinjankoehler

Description

@martinjankoehler

Reason for #2284 is the following.

Problem

Calling

config_key = 'vector_file_export/lru_runsets'
config_value = '["/Users/martin/Source/klayout/export.json"]'
pya.Application.instance().save_config(config_key, config_value)

This results in a klayoutrc entry:

 <vector_file_export/lru_runsets>["/Users/martin/Source/klayout/export.json"]</vector_file_export/lru_runsets>

This then results in Problem reading config file /Users/martin/.klayout/klayoutrc: XML parser error: error occurred while parsing element in line 1456, column 22.

Analysis

Reason for this is that the / characters are not normalized. They should be escaped as `&slash;

save_config should either normalize / to a character from {., -, _}, or should throw an InvalidConfigKeyException

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions