Skip to content

Commit

Permalink
add config error
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Sep 29, 2023
1 parent 77c2c3c commit f0fd793
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pipestatreader/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ def main(configfile: Optional[str] = None, host: Optional[str] = None, port: Opt
"""
pipestatcfg = configfile or os.environ.get("PIPESTAT_CONFIG")
if pipestatcfg is None:
_LOGGER.error(

Check warning on line 167 in pipestatreader/reader.py

View check run for this annotation

Codecov / codecov/patch

pipestatreader/reader.py#L165-L167

Added lines #L165 - L167 were not covered by tests
"A pipestat configuration file must be supplied."
"Configure by setting PIPESTAT_CONFIG env var or pass as input argument using --config"
)
create_global_pipestatmanager(pipestatcfg)

Check warning on line 171 in pipestatreader/reader.py

View check run for this annotation

Codecov / codecov/patch

pipestatreader/reader.py#L171

Added line #L171 was not covered by tests
# Note input argument app vs "reader:app" causes different behavior when using uvicorn.run
uvicorn.run(

Check warning on line 173 in pipestatreader/reader.py

View check run for this annotation

Codecov / codecov/patch

pipestatreader/reader.py#L173

Added line #L173 was not covered by tests
Expand Down

0 comments on commit f0fd793

Please sign in to comment.