Skip to content

_caller_path() may not act the way it's supposed to #126

@davidchern

Description

@davidchern

According to my test, the method _caller_path() just return name of the executed file, but not the full path. Thus, os.path.dirname(file_name) will always return an empty string ''. Although with os.path.abspath('') we will always get the current directory correctly, the method _caller_path() seems redundant and can be removed.

Then, __init__(self, search_path=None): can be modified into __init__(self, search_path=''):. And self._load(self.search_path or self._caller_path()) will be simply self._load(self.search_path). My test on this modification works well so far.

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