Skip to content

config.py expand_path unexpected behavior #43

@dougransom

Description

@dougransom

in repot https://github.com/dougransom/natlinkcore/tree/nc_tests_tweak/src/natlinkcore

I added

except Exception as e:
        print(f"{__file__} Exception {e} ignored in expand_path{input_path}")

catching

C:\Users\doug\code\dt\natlinkcore\src\natlinkcore\config.py Exception PureWindowsPath('C:') has an empty name ignored in expand_pathC:\Users\doug\code\dt\unimacro\tests\unimacro_test_natlink_config.natlink

Not sure why that is being thrown, but not catching exceptions here seems to cause issues.

I would propose a keyword argument to expand path, attempt_load=True which will only try the import trick if it is set.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions