Skip to content

Commit

Permalink
Add a default value for the VINEYARD_CONFIG while connecting. (#1761)
Browse files Browse the repository at this point in the history
Fixes #1750

Signed-off-by: Ye Cao <[email protected]>
  • Loading branch information
dashanji authored Feb 19, 2024
1 parent 442530d commit 07e0fb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/vineyard/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ def __init__(
a path to a directory containing the default config file
`vineyard.yaml`. Also, the environment variable
`VINEYARD_CONFIG` can be used to specify the
path to the configuration file.
path to the configuration file. If not defined, the default
config file `/var/run/vineyard/config.yaml` will be used.
The content of the configuration file should has the following content:
Expand Down Expand Up @@ -178,7 +179,7 @@ def __init__(
if not endpoint and not (host and port):
endpoint = os.getenv('VINEYARD_RPC_ENDPOINT', None)
if not config:
config = os.getenv('VINEYARD_CONFIG', None)
config = os.getenv('VINEYARD_CONFIG', '/var/run/vineyard/config.yaml')
if endpoint:
if not isinstance(endpoint, (tuple, list)):
endpoint = endpoint.split(':')
Expand Down

0 comments on commit 07e0fb0

Please sign in to comment.