Skip to content

Commit

Permalink
Remove unused deprecated self._config field
Browse files Browse the repository at this point in the history
The storage of the parsed configs might need to be reviewed,
as the include support introduced complexity.

Due to how includes work, the order of the include is also relevant
during lookup time.

One possible solution would be to flatten the parsed config:
to compile the host/match conditions through includes during parsing.
This way the lookup could be much simpler.
  • Loading branch information
mrmeszaros committed Jan 30, 2024
1 parent 0bb524f commit 1ec4d95
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions paramiko/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ def __init__(self):
# Or if you have arbitrary ssh_config text from some other source:
config = SSHConfig.from_text("Host foo\\n\\tUser bar")
"""
self._config = []
self._config_root = None
self._config_by_file = {}

Expand Down Expand Up @@ -357,7 +356,7 @@ def _lookup(
if key not in options:
# Create a copy of the original value,
# else it will reference the original list
# in self._config and update that value too
# in self._config_by_file and update that value too
# when the extend() is being called.
options[key] = value[:] if value is not None else value
elif key == "identityfile":
Expand Down

0 comments on commit 1ec4d95

Please sign in to comment.