From 4c61c3d7ea5cc3275a6d18ce1f29aacee3ed6356 Mon Sep 17 00:00:00 2001 From: gryf Date: Sat, 14 Sep 2024 17:00:28 +0200 Subject: [PATCH] Fix user provided whdload options --- fs_uae_wrapper/whdload.py | 4 ++-- tests/test_whdload.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs_uae_wrapper/whdload.py b/fs_uae_wrapper/whdload.py index 59c3d73..f44e3d8 100644 --- a/fs_uae_wrapper/whdload.py +++ b/fs_uae_wrapper/whdload.py @@ -114,10 +114,10 @@ def _find_slave(self): # find proper way to handle slave # 1. check if there are user provided params contents = f"cd {slave_path}\n" - if self.fsuae_options.get('wrapper_whdload_options'): + if self.all_options.get('wrapper_whdload_options'): contents = (f"{contents}" f"C:whdload " - f"{self.fsuae_options['wrapper_whdload_options']} " + f"{self.all_options['wrapper_whdload_options']} " f"Slave={slave_fname}\n") else: # no params, find if kgiconload is available diff --git a/tests/test_whdload.py b/tests/test_whdload.py index 9d2e007..95bfb97 100644 --- a/tests/test_whdload.py +++ b/tests/test_whdload.py @@ -225,7 +225,7 @@ def test_find_custom_options(self, chdir, walk, listdir): listdir.return_value = contents wrapper = whdload.Wrapper('Config.fs-uae', utils.CmdOption(), {}) whdl_opts = 'Preload SplashDelay=0 MMU PAL' - wrapper.fsuae_options['wrapper_whdload_options'] = whdl_opts + wrapper.all_options['wrapper_whdload_options'] = whdl_opts with mock.patch('builtins.open', _open): self.assertTrue(wrapper._find_slave()) handle = _open()