Skip to content

Commit

Permalink
add a way to inject args to main without sys.argv
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Yocum committed Apr 22, 2021
1 parent 8eae14a commit 6d71956
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions disdat/entrypoints/docker_ep.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,7 @@ def run_disdat_container(args):
sys.exit(os.EX_OK)


def main():

input_args = sys.argv[1:]
def argparse_and_run(input_args):

# To simplify configuring and building pipeline images, we can keep
# various default parameter values in the Docker image makefile,
Expand Down Expand Up @@ -378,6 +376,11 @@ def main():
run_disdat_container(args)


def main():
input_args = sys.argv[1:]
argparse_and_run(input_args)


if __name__ == '__main__':
main()

Expand Down

0 comments on commit 6d71956

Please sign in to comment.