From ae5b19a671475674b2bcbd956989a40c12b30eab Mon Sep 17 00:00:00 2001 From: prodigysml Date: Sat, 22 Jan 2022 20:16:34 +1100 Subject: [PATCH] fixed python styling issues that made me go bonkers --- Interlace/interlace.py | 1 + Interlace/lib/core/input.py | 2 +- Interlace/lib/core/output.py | 4 ++-- Interlace/lib/threader.py | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Interlace/interlace.py b/Interlace/interlace.py index 0ac57e2..b3506ba 100644 --- a/Interlace/interlace.py +++ b/Interlace/interlace.py @@ -18,6 +18,7 @@ def task_queue_generator_func(arguments, output, repeat): output.terminal(Level.THREAD, task.name(), "Added to Queue") yield task + def main(): parser = InputParser() arguments = parser.parse(argv[1:]) diff --git a/Interlace/lib/core/input.py b/Interlace/lib/core/input.py index 68e6eea..f8bef43 100644 --- a/Interlace/lib/core/input.py +++ b/Interlace/lib/core/input.py @@ -209,7 +209,7 @@ class InputHelper(object): target_spec = IPSet((target_spec,)) else: target_spec = [target_spec] - + for i in target_spec: ips_list.append(str(i)) return (str_targets, set(ips_list)) diff --git a/Interlace/lib/core/output.py b/Interlace/lib/core/output.py index 9e5d46d..69d7454 100644 --- a/Interlace/lib/core/output.py +++ b/Interlace/lib/core/output.py @@ -42,7 +42,7 @@ class OutputHelper(object): 'target': target, 'command': command, 'message': message, - 'leader': leader + 'leader': leader } if not self.silent: @@ -50,7 +50,7 @@ class OutputHelper(object): template = '[{time}] {leader} [{target}] {command} {message}' else: template = '[{time}] {leader} [{target}] {command} {message}' - + print(template.format(**format_args)) diff --git a/Interlace/lib/threader.py b/Interlace/lib/threader.py index dc7fbbd..22f28dd 100644 --- a/Interlace/lib/threader.py +++ b/Interlace/lib/threader.py @@ -11,6 +11,7 @@ if platform.system().lower() == 'linux': else: shell = None + class Task(object): def __init__(self, command, silent=False): self.task = command