Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #17 from ping13/default-config-change
Browse files Browse the repository at this point in the history
changed behavior of reading the config file
  • Loading branch information
ping13 authored Apr 24, 2022
2 parents 05545d1 + bafcfa2 commit f1ddeca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ You have an [HEOS][] speaker in your local network and Python 3.
to use the latest git version). You can also download the source package and
run `pip install .`.

1. Create a `config.json` file, which may reside in the current directory, in
a directory called `$HOME/.heospy/` or in a directory wich is specified by the environment
variable `$HEOSPY_CONF`. The config file contains the name of the lead
[HEOS][] player you want to control and the username and password of your
[HEOS account][]. See `example-config.json` for an example.
1. Create a `config.json` file, which may reside in a directory called
`$HOME/.heospy/` or in a directory wich is specified by the environment
variable `$HEOSPY_CONF`. You can also specify the config-file directly witgh
`-c`. The config file contains the name of the lead [HEOS][] player you want
to control and the username and password of your [HEOS account][]. See
`example-config.json` for an example.

2. Run the script for the first time to see how this works:

Expand Down
2 changes: 1 addition & 1 deletion heospy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

# determine a default path for the config file
DEFAULT_CONFIG_PATH = "."
for location in os.curdir, os.path.expanduser("~/.heospy"), os.environ.get("HEOSPY_CONF"):
for location in os.environ.get("HEOSPY_CONF"), os.environ.get("HEOSPY_CONF"):
if location is None:
continue
try:
Expand Down

0 comments on commit f1ddeca

Please sign in to comment.