Skip to content
This repository was archived by the owner on May 9, 2020. It is now read-only.

inject default values to from_config_file method #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions chef/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, url, key, client, version='0.10.8', headers={}, ssl_verify=Tr
self.set_default()

@classmethod
def from_config_file(cls, path):
def from_config_file(cls, path, url=None, key_path=None, client_name=None):
"""Load Chef API paraters from a config file. Returns None if the
config can't be used.
"""
Expand All @@ -83,7 +83,6 @@ def from_config_file(cls, path):
# Can't even read the config file
log.debug('Unable to read config file "%s"', path)
return
url = key_path = client_name = None
ssl_verify = True
for line in open(path):
if not line.strip() or line.startswith('#'):
Expand Down