diff --git a/port.py b/port.py index 55c290a..89748f8 100644 --- a/port.py +++ b/port.py @@ -873,7 +873,7 @@ class Portainer: def update_containers(self): all_containers = self.all_data["containers"][self.args.endpoint_id] #input(all_containers) - service_tuples = [(s[1], s[0]) for s in all_containers if "." not in s[0] and not s[1].startswith("runner_")] + service_tuples = [(s[1], s[0]) for s in all_containers if "." not in s[0] and not s[0].startswith("runner_")] service_tuples = sorted(service_tuples, key=lambda x: x[1]) service_dict = dict(service_tuples) # input(service_tuples) diff --git a/portainer.py b/portainer.py index ff9f331..8fdfd0e 100755 --- a/portainer.py +++ b/portainer.py @@ -39,7 +39,7 @@ else: raise Exception("Failed to authenticate with Vault") # Specify the mount point of your KV engine -VERSION = "0.1.16" +VERSION = "0.1.17" defaults = { "endpoint_id": "vm01", @@ -372,7 +372,7 @@ def prompt_missing_args(args_in, defaults_in, fields, action=None,stacks=None): if __name__ == "__main__": # Example usage: set PORTAINER_USER and PORTAINER_PASS in env, or pass literals below. - # token = get_portainer_token(base,"admin","l4c1j4yd33Du5lo") # or get_portainer_token(base, "admin", "secret") + def signal_handler(sig, frame): logger.warning("Killed manually %s, %s", sig, frame) print("\nTerminated by user")