Skip to content

Commit

Permalink
Fixing the dry-run option so it really does set a verbosity level of …
Browse files Browse the repository at this point in the history
…at least INFO
  • Loading branch information
Jeremy Gillula committed Jul 27, 2023
1 parent 6041a67 commit b58a434
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions paperlessngx_postprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
sys.exit(1)

if config["dry_run"]:
# Force at least info level, by choosing whichever level is lower, the given level or info (since more verbose is lower)
logger.setLevel(min(logging.getLevelName(config["verbose"]), logging.getLevelName("INFO")))
logger.info("Doing a dry run. No changes will be made.")

api = PaperlessAPI(config["paperless_api_url"],
Expand Down

0 comments on commit b58a434

Please sign in to comment.