formatting fix
This commit is contained in:
parent
17c088526b
commit
ed449034f7
1 changed files with 10 additions and 10 deletions
|
|
@ -554,7 +554,7 @@ def interactive_exec(pod_name: str, namespace: str):
|
||||||
if resp and resp.is_open():
|
if resp and resp.is_open():
|
||||||
try:
|
try:
|
||||||
resp.close()
|
resp.close()
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Always restore terminal settings
|
# Always restore terminal settings
|
||||||
|
|
@ -580,7 +580,7 @@ def exec(
|
||||||
If multiple inspectors are found, you'll get to choose which one to explore.
|
If multiple inspectors are found, you'll get to choose which one to explore.
|
||||||
"""
|
"""
|
||||||
config.load_kube_config() # or config.load_incluster_config() if running inside a pod
|
config.load_kube_config() # or config.load_incluster_config() if running inside a pod
|
||||||
core_v1 = client.CoreV1Api()
|
client.CoreV1Api()
|
||||||
|
|
||||||
pod_name, pod_namespace = get_pod(namespace)
|
pod_name, pod_namespace = get_pod(namespace)
|
||||||
|
|
||||||
|
|
@ -797,7 +797,7 @@ def create(
|
||||||
if namespace is None and clone is not None and "/" in clone:
|
if namespace is None and clone is not None and "/" in clone:
|
||||||
selected_namespace, selected_pod = clone.split("/", 1)
|
selected_namespace, selected_pod = clone.split("/", 1)
|
||||||
|
|
||||||
namepaces = get_namespaces(namespace)
|
get_namespaces(namespace)
|
||||||
pods = get_pods(namespace, label_selector="app!=krayt")
|
pods = get_pods(namespace, label_selector="app!=krayt")
|
||||||
|
|
||||||
if not pods:
|
if not pods:
|
||||||
|
|
@ -916,10 +916,10 @@ def list_pods():
|
||||||
typer.echo(f"{pod} ({namespace})")
|
typer.echo(f"{pod} ({namespace})")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
# def main():
|
||||||
setup_environment()
|
# setup_environment()
|
||||||
app()
|
# app()
|
||||||
|
#
|
||||||
|
#
|
||||||
if __name__ == "__main__":
|
# if __name__ == "__main__":
|
||||||
main()
|
# main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue