more formatting

This commit is contained in:
alsadi 2019-03-23 22:07:06 +02:00
parent e6e99773ce
commit 732214db07

View File

@ -218,15 +218,19 @@ def run_podman(dry_run, podman_path, podman_args, wait=True, sleep=1):
time.sleep(sleep) time.sleep(sleep)
return p return p
#pylint: disable=unused-argument # pylint: disable=unused-argument
def down(project_name, dirname, pods, containers, dry_run, podman_path): def down(project_name, dirname, pods, containers, dry_run, podman_path):
for cnt in containers: for cnt in containers:
run_podman(dry_run, podman_path, ["stop", "-t=1", cnt["name"]], sleep=0) run_podman(dry_run, podman_path, [
"stop", "-t=1", cnt["name"]], sleep=0)
for cnt in containers: for cnt in containers:
run_podman(dry_run, podman_path, ["rm", cnt["name"]], sleep=0) run_podman(dry_run, podman_path, ["rm", cnt["name"]], sleep=0)
for pod in pods: for pod in pods:
run_podman(dry_run, podman_path, ["pod", "rm", pod["name"]], sleep=0) run_podman(dry_run, podman_path, ["pod", "rm", pod["name"]], sleep=0)
def container_to_args(cnt, dirname): def container_to_args(cnt, dirname):
pod = cnt.get('pod') or '' pod = cnt.get('pod') or ''
args = [ args = [
@ -346,9 +350,10 @@ def up(project_name, dirname, pods, containers, no_cleanup, dry_run, podman_path
def compose( def compose(
command, filename, project_name, no_ansi, command, filename, project_name,
no_cleanup, dry_run, transform_policy, no_ansi, no_cleanup, dry_run,
podman_path, host_env=None): transform_policy, podman_path, host_env=None,
):
filename = os.path.realpath(filename) filename = os.path.realpath(filename)
dirname = os.path.dirname(filename) dirname = os.path.dirname(filename)
dir_basename = os.path.basename(dirname) dir_basename = os.path.basename(dirname)
@ -461,5 +466,6 @@ def main():
podman_path=args.podman_path podman_path=args.podman_path
) )
if __name__ == "__main__": if __name__ == "__main__":
main() main()