Skip to content

Commit

Permalink
#92 fix conditional block for default exec
Browse files Browse the repository at this point in the history
  • Loading branch information
Quan Le committed Aug 23, 2017
1 parent d01d40d commit 102100d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gslab_scons/builders/build_stata.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,18 @@ def build_stata(target, source, env):

# Set up command line arguments
cl_arg = misc.command_line_args(env)

executable = misc.get_stata_executable(env)
executable = misc.get_stata_executable(env)
command_skeleton = misc.get_stata_command(executable)

try:
command = command_skeleton % (source_file, cl_arg)
subprocess.check_output(command,
stderr = subprocess.STDOUT,
shell = True)
except subprocess.CalledProcessError:
message = misc.command_error_msg("Stata", command)
if env['stata_executable'] in [None, 'None', '']:
message = message + '\n Maybe try specifying the Stata executable in config_user.yaml?'
raise ExecCallError(message)

shutil.move(loc_log, log_file)
Expand Down

0 comments on commit 102100d

Please sign in to comment.