Skip to content

Commit

Permalink
Fix UnboundLocalError in plugin_sas.py
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano committed Nov 2, 2022
1 parent 968109e commit d7ed191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/watts/plugin_sas.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ def __init__(self, template_file: str,
# Check OS to make sure the extension of the executable is correct.
# Linux and macOS have different executables but both are ".x".
# The Windows executable is ".exe".
ext = "exe" if platform.system() == "Windows" else "x"
sas_dir = Path(os.environ.get("SAS_DIR", ""))
self._conv_channel = sas_dir / f"CHANNELtoCSV.{ext}"
self._conv_primar4 = sas_dir / f"PRIMAR4toCSV.{ext}"
ext = "exe" if platform.system() == "Windows" else "x"
executable = sas_dir / f"sas.{ext}"
execute_command = ['{self.executable}', '-i', '{self.input_name}',
'-o', 'out.txt']
Expand Down

0 comments on commit d7ed191

Please sign in to comment.