Skip to content

Commit

Permalink
Fixing loglevel error in CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnPreston committed Mar 16, 2023
1 parent 63b2f8b commit a359787
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ecs_composex/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ def main_parser():
base_command_parser.add_argument(
"--loglevel", type=str, help="Log level. Defaults to INFO", required=False
)
parser.add_argument(
"--loglevel", type=str, help="Log level. Defaults to INFO", required=False
)
for command in ComposeXSettings.active_commands:
cmd_parsers.add_parser(
name=command["name"],
Expand All @@ -169,7 +172,7 @@ def main():
parser.print_help()
sys.exit()
args = parser.parse_args()
if args.loglevel:
if hasattr(args, "loglevel") and args.loglevel:
valid_levels = [
"FATAL",
"CRITICAL",
Expand Down

0 comments on commit a359787

Please sign in to comment.