Skip to content

Commit

Permalink
A command-line argument to force a 0 return value
Browse files Browse the repository at this point in the history
  • Loading branch information
zivnevo committed Sep 22, 2021
1 parent 715963e commit 1bcd925
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/baseline_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,15 @@ def netpol_verify_main(args=None):
parser.add_argument('--tmp_dir', type=str, default='/tmp',
help="A directory into which verifier's temporary files can be written")
parser.add_argument('--debug', type=int, help="Set to 1 to print debug information")
parser.add_argument('--return_0', action='store_true', help='Force a return value 0')
args = parser.parse_args(args)

if args.ghe_token:
os.environ['GHE_TOKEN'] = args.ghe_token

npv = NetpolVerifier(args.netpol_file, args.baseline, args.repo, args.nca_path)
return npv.verify(args)
ret_val = npv.verify(args)
return 0 if args.return_0 else ret_val


if __name__ == "__main__":
Expand Down

0 comments on commit 1bcd925

Please sign in to comment.