Skip to content

Commit

Permalink
Bug fix in print-config when no config is present
Browse files Browse the repository at this point in the history
  • Loading branch information
zwimer committed Jan 14, 2024
1 parent db009aa commit 77ba28d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rpipe/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__: str = "4.0.0" # Must be "<major>.<minor>.<patch>", all numbers
__version__: str = "4.0.1" # Must be "<major>.<minor>.<patch>", all numbers
5 changes: 2 additions & 3 deletions rpipe/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
_TIMEOUT: int = 60


logging.basicConfig(level=logging.WARNING, format="%(message)s")


#
# Classes
#
Expand Down Expand Up @@ -201,6 +198,7 @@ def _print_config() -> None:
print(f"Config file: {CONFIG_FILE}")
if not CONFIG_FILE.exists():
print("No saved config")
return
raw = CONFIG_FILE.read_text(encoding="utf-8")
try:
print(Config(**json.loads(raw)))
Expand Down Expand Up @@ -309,6 +307,7 @@ def main(prog: str, *args: str) -> None:
help="Update the existing rpipe config then exit; allows incomplete configs to be saved",
)
ns = vars(parser.parse_args(args))
logging.basicConfig(level=logging.WARNING, format="%(message)s")
if ns.pop("verbose"):
logging.getLogger().setLevel(logging.DEBUG)
keys = lambda x: (i.name for i in fields(x))
Expand Down

0 comments on commit 77ba28d

Please sign in to comment.