Skip to content

Commit

Permalink
arg_parser.py: Fixed bandit scan
Browse files Browse the repository at this point in the history
  • Loading branch information
artanokhov committed Sep 3, 2024
1 parent aaddd2b commit 6929317
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion utils/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,12 @@ def parse_args(name: str, description: str): # noqa
)

if args.mode not in ("test", "deploy"):
args.year = args.build_id[:4] if args.build_id else args.product_version[:4]
if args.build_id:
args.year = args.build_id[:4]
elif args.product_version:
args.year = args.product_version[:4]
else:
args.year = None

if args.mode == "test" and not args.product_version:
match = re.search(r":(\d{4}\.\d\.\d)", str(args.tags))
Expand Down

0 comments on commit 6929317

Please sign in to comment.