Closed
Description
Trying to work around #915, I started writing code that would try to call Config.get_*_config()
to check whether they are out there.
However, if Config.__init__()
raises an exception (e.g., because the .gitconfig
file is not readable or is a directory), then on program termination (or garbage collection), a seemingly spurious exception is raised:
Exception ignored in: <function Config.__del__ at 0x7fe011d96730>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pygit2/config.py", line 99, in __del__
C.git_config_free(self._config)
AttributeError: 'Config' object has no attribute '_config'
This happens also if the exception is caught, i.e., when the exception from __init__()
is not seen by the user.
Metadata
Metadata
Assignees
Labels
No labels