Skip to content

Commit

Permalink
Exit with error message if --format is used with --output other than …
Browse files Browse the repository at this point in the history
…text
  • Loading branch information
ricardobranco777 committed Sep 12, 2023
1 parent fe9255d commit 73a692b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bugme.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,8 @@ def main() -> None: # pylint: disable=too-many-branches

if __name__ == "__main__":
args = parse_args()
if args.format and args.output != "text":
sys.exit(f"ERROR: The --format option is not valid for output {args.output}")
logging.basicConfig(
format="%(levelname)-8s %(message)s", stream=sys.stderr, level=args.log.upper()
)
Expand Down

0 comments on commit 73a692b

Please sign in to comment.