From 078189dbbfaf8dfdf2ab060525d6361942fbe78b Mon Sep 17 00:00:00 2001 From: Joey Payne Date: Wed, 11 Nov 2015 16:32:57 -0700 Subject: [PATCH] Fixed logic with bat files. --- command_line.py | 3 ++- main.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command_line.py b/command_line.py index 7333ff5..c4f0ef2 100644 --- a/command_line.py +++ b/command_line.py @@ -949,7 +949,8 @@ class CommandBase(object): export_dirs=ex_dir_vars, **export_dict) batcontents = '{}{}'.format(env_vars.replace('\n',''), contents.replace('\n', ' & ')) - batcontents = batcontents[:-3] + if batcontents.endswith(' & '): + batcontents = batcontents[:-3] command = ['cmd', '/c', "'" + batcontents + "'"] diff --git a/main.py b/main.py index 0d072fc..2a3f371 100644 --- a/main.py +++ b/main.py @@ -975,7 +975,6 @@ class MainWindow(QtGui.QMainWindow, CommandBase): file_types.append('*.bat') else: file_types.append('*.bash') - file_types.append('*.bat') script_button.clicked.connect(self.call_with_object('get_file_reg', script_button, self.script_line, script_setting,