Skip to content

Commit

Permalink
Feckless probing for cause of sasinitfolder/autoexec.sas bug #35
Browse files Browse the repository at this point in the history
  • Loading branch information
rpardee committed Oct 23, 2018
1 parent a311fe9 commit 3b70137
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion run_sas_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def run(self):
lst_filename = prg_filename[:-3] + 'lst'
lrn_filename = lst_filename + '.last.run'
wrkdir, prog = os.path.split(prg_filename)
wrkdir += os.sep
if os.path.exists(lrn_filename):
os.remove(lrn_filename)
s = sublime.load_settings('SAS_Package.sublime-settings')
Expand All @@ -30,7 +31,7 @@ def run(self):
sublime.save_settings('SAS_Package.sublime-settings')
err_regx = re.compile(err_regx, re.MULTILINE + re.IGNORECASE)
if sas_config_path == '':
config_spec = []
config_spec = ''
else:
if os.path.exists(sas_config_path):
# Not really sure why I have to manually quote-delimit this, but it appears I do.
Expand All @@ -39,7 +40,9 @@ def run(self):
sublime.message_dialog('Could not find config file "' + sas_config_path + '"--ignoring.')
config_spec = []
if os.path.exists(sas_path):
# call_args = [sas_path, '-sysin', prg_filename, '-log', log_filename, '-SASINITIALFOLDER', wrkdir]
call_args = [sas_path, config_spec, '-sysin', prg_filename, '-log', log_filename, '-print', lst_filename, '-SASINITIALFOLDER', wrkdir] + sas_args
# sublime.message_dialog(wrkdir)
# sublime.message_dialog(subprocess.list2cmdline(call_args))
threads = []
thread = RunSasThreaded(self, call_args, prg_filename, lst_filename, log_filename, err_regx, sas_path, logfile_encoding)
Expand Down Expand Up @@ -77,6 +80,7 @@ def __init__(self, window_reference, call_args, prg_filename, lst_filename, log_
threading.Thread.__init__(self)

def run(self):
# sublime.message_dialog("call args are: " + str(self.call_args))
subprocess.call(self.call_args)
if os.path.exists(self.lst_filename):
self.window_reference.window.open_file(self.lst_filename)
Expand Down

0 comments on commit 3b70137

Please sign in to comment.