Skip to content

Commit

Permalink
fix: resolve _scenario_info property for state, fix typo, change ssh …
Browse files Browse the repository at this point in the history
…to fs according to PR #520
  • Loading branch information
Kaspar Mueller authored and kasparm committed Oct 23, 2021
1 parent ee0bd1e commit 7a8d26d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions powersimdata/data_access/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _run_script(self, script, extra_args=None):
if extra_args is None:
extra_args = []

engine = self.scenario._scenario_info["engine"]
engine = self.scenario.state._scenario_info["engine"]
path_to_package = posixpath.join(server_setup.MODEL_DIR, engine)
folder = "pyreise" if engine == "REISE" else "pyreisejl"

Expand All @@ -111,7 +111,7 @@ def _run_script(self, script, extra_args=None):
]
cmd_io_redirect = ["</dev/null >/dev/null 2>&1 &"]
cmd = cmd_pythonpath + cmd_pythoncall + extra_args + cmd_io_redirect
process = self.scenario._data_access.execute_command_async(cmd)
process = self.scenario.data_access.execute_command_async(cmd)
print("PID: %s" % process.pid)
return process

Expand Down
2 changes: 1 addition & 1 deletion powersimdata/data_access/tests/test_data_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_tmp_folder(ssh_data_access):
@pytest.mark.integration
@pytest.mark.ssh
def test_setup_server_connection(ssh_data_access):
_, stdout, _ = ssh_data_access.ssh.exec_command("whoami")
_, stdout, _ = ssh_data_access.fs.exec_command("whoami")
assert stdout.read().decode("utf-8").strip() == server_setup.get_server_user()


Expand Down

0 comments on commit 7a8d26d

Please sign in to comment.