Smarter env/arg management

This commit is contained in:
oitsjustjose 2021-06-10 21:12:55 -05:00
commit 00ae0e4098

View file

@ -7,7 +7,6 @@ import os
import subprocess
from argparse import Namespace
from typing import Dict
from urllib.parse import urlparse
import docker
@ -24,10 +23,10 @@ def _build_env(args: Namespace) -> Dict[str, any]:
Return:
(Dict[str, any]): the args, dictified
"""
ret = {
"VERSION": args.version,
"EULA": True,
}
ret = {"VERSION": args.version, "EULA": True}
for arg in vars(args):
if getattr(args, arg):
ret[arg.upper()] = getattr(args, arg)
return ret