Fix more lint errors
This commit is contained in:
parent
c56560ce85
commit
3e1d98ab83
@ -141,7 +141,7 @@ def exec_operation(ctx, extra_args):
|
|||||||
try:
|
try:
|
||||||
ctx.obj.docker.compose.execute(service_name, command_to_exec, envs=container_exec_env)
|
ctx.obj.docker.compose.execute(service_name, command_to_exec, envs=container_exec_env)
|
||||||
except DockerException:
|
except DockerException:
|
||||||
print(f"container command returned error exit status")
|
print("container command returned error exit status")
|
||||||
|
|
||||||
|
|
||||||
def logs_operation(ctx, tail: int, follow: bool, extra_args: str):
|
def logs_operation(ctx, tail: int, follow: bool, extra_args: str):
|
||||||
|
@ -41,7 +41,7 @@ def _get_ports(stack):
|
|||||||
for svc_name, svc in parsed_pod_file["services"].items():
|
for svc_name, svc in parsed_pod_file["services"].items():
|
||||||
if "ports" in svc:
|
if "ports" in svc:
|
||||||
# Ports can appear as strings or numbers. We normalize them as strings.
|
# Ports can appear as strings or numbers. We normalize them as strings.
|
||||||
ports[svc_name] = [ str(x) for x in svc["ports"] ]
|
ports[svc_name] = [str(x) for x in svc["ports"]]
|
||||||
return ports
|
return ports
|
||||||
|
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ def _get_mapped_ports(stack: str, map_recipe: str):
|
|||||||
ports_array = ports[service]
|
ports_array = ports[service]
|
||||||
for x in range(0, len(ports_array)):
|
for x in range(0, len(ports_array)):
|
||||||
orig_port = ports_array[x]
|
orig_port = ports_array[x]
|
||||||
random_port = random.randint(20000,50000) # Beware: we're relying on luck to not collide
|
random_port = random.randint(20000, 50000) # Beware: we're relying on luck to not collide
|
||||||
if map_recipe == "any-variable-random":
|
if map_recipe == "any-variable-random":
|
||||||
# This is the default so take no action
|
# This is the default so take no action
|
||||||
pass
|
pass
|
||||||
@ -202,11 +202,11 @@ def _get_mapped_ports(stack: str, map_recipe: str):
|
|||||||
return ports
|
return ports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@click.command()
|
@click.command()
|
||||||
@click.option("--output", required=True, help="Write yaml spec file here")
|
@click.option("--output", required=True, help="Write yaml spec file here")
|
||||||
@click.option("--map-ports-to-host", required=False,
|
@click.option("--map-ports-to-host", required=False,
|
||||||
help="Map ports to the host as one of: any-variable-random (default), localhost-same, any-same, localhost-fixed-random, any-fixed-random")
|
help="Map ports to the host as one of: any-variable-random (default), "
|
||||||
|
"localhost-same, any-same, localhost-fixed-random, any-fixed-random")
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def init(ctx, output, map_ports_to_host):
|
def init(ctx, output, map_ports_to_host):
|
||||||
yaml = get_yaml()
|
yaml = get_yaml()
|
||||||
|
@ -118,7 +118,7 @@ def process_repo(verbose, quiet, dry_run, pull, check_only, git_ssh, dev_root_pa
|
|||||||
origin = git_repo.remotes.origin
|
origin = git_repo.remotes.origin
|
||||||
origin.pull(progress=None if quiet else GitProgress())
|
origin.pull(progress=None if quiet else GitProgress())
|
||||||
else:
|
else:
|
||||||
print(f"skipping pull because this repo checked out a tag")
|
print("skipping pull because this repo checked out a tag")
|
||||||
else:
|
else:
|
||||||
print("(git pull skipped)")
|
print("(git pull skipped)")
|
||||||
if not is_present:
|
if not is_present:
|
||||||
|
Loading…
Reference in New Issue
Block a user