diff --git a/Interlace/lib/core/__version__.py b/Interlace/lib/core/__version__.py index 51ed7c4..c3b3841 100644 --- a/Interlace/lib/core/__version__.py +++ b/Interlace/lib/core/__version__.py @@ -1 +1 @@ -__version__ = '1.5.1' +__version__ = '1.5.2' diff --git a/Interlace/lib/core/input.py b/Interlace/lib/core/input.py index 260d155..ea6a308 100644 --- a/Interlace/lib/core/input.py +++ b/Interlace/lib/core/input.py @@ -355,7 +355,7 @@ class InputParser(object): ) parser.add_argument( - '--no-bar', '--sober', dest='sober', action='store_true', default=True, + '--no-bar', '--sober', dest='sober', action='store_true', default=False, help='If set then progress bar will be stripped out' ) diff --git a/Interlace/lib/core/output.py b/Interlace/lib/core/output.py index 3151670..563ef3b 100644 --- a/Interlace/lib/core/output.py +++ b/Interlace/lib/core/output.py @@ -12,14 +12,15 @@ class OutputHelper(object): self.verbose = arguments.verbose self.silent = arguments.silent - self.seperator = "=================================================================================" + self.seperator = "=====================================================" def print_banner(self): if self.silent: return print(self.seperator) - print("Interlace v%s\tby Michael Skelton (@codingo_) & Sajeeb Lohani (@sml555_)" % __version__) + print("Interlace v%s\tby Michael Skelton (@codingo_)" % __version__) + print(" & Sajeeb Lohani (@sml555_)") print(self.seperator) def terminal(self, level, target, command, message=""): diff --git a/Interlace/lib/threader.py b/Interlace/lib/threader.py index 65528a4..f33b882 100644 --- a/Interlace/lib/threader.py +++ b/Interlace/lib/threader.py @@ -16,17 +16,22 @@ class Worker(object): try: # get task from queue task = self.queue.pop(0) - if self.tqdm: + if isinstance(self.tqdm, tqdm): self.tqdm.update(1) - # run task - self.run_task(task, self.tqdm) + # run task + self.run_task(task, self.tqdm) + else: + self.run_task(task) except IndexError: break @staticmethod - def run_task(task, t): - s = subprocess.Popen(task, shell=True, stdout=subprocess.PIPE) - t.write(s.stdout.readline().decode("utf-8")) + def run_task(task, t=False): + if t: + s = subprocess.Popen(task, shell=True, stdout=subprocess.PIPE) + t.write(s.stdout.readline().decode("utf-8")) + else: + subprocess.Popen(task, shell=True) class Pool(object): @@ -48,10 +53,10 @@ class Pool(object): self.output = output self.max_workers = max_workers - if progress_bar: + if not progress_bar: self.tqdm = tqdm(total=len(queue)) else: - self.tqdm = False + self.tqdm = True def run(self):