From d7ed191193945643392a17dae9c0692af91f64d3 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 2 Nov 2022 15:29:47 -0500 Subject: [PATCH] Fix UnboundLocalError in plugin_sas.py --- src/watts/plugin_sas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/watts/plugin_sas.py b/src/watts/plugin_sas.py index 5be1b0c0..033f1ec2 100644 --- a/src/watts/plugin_sas.py +++ b/src/watts/plugin_sas.py @@ -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']