mirror of
https://github.com/gryf/fs-uae-wrapper.git
synced 2025-12-19 04:20:23 +01:00
Get rid of unneeded _run_emulator parameter
This commit is contained in:
@@ -40,7 +40,7 @@ class Wrapper(base.ArchiveBase):
|
||||
if not self._copy_conf():
|
||||
return False
|
||||
|
||||
if not self._run_emulator(self.fsuae_options.list()):
|
||||
if not self._run_emulator():
|
||||
return False
|
||||
|
||||
if self._get_saves_dir():
|
||||
|
||||
@@ -78,11 +78,11 @@ class Base(object):
|
||||
os.path.join(self.dir, 'Config.fs-uae'))
|
||||
return True
|
||||
|
||||
def _run_emulator(self, fsuae_options):
|
||||
"""execute fs-uae in provided directory"""
|
||||
def _run_emulator(self):
|
||||
"""execute fs-uae"""
|
||||
curdir = os.path.abspath('.')
|
||||
os.chdir(self.dir)
|
||||
utils.run_command(['fs-uae'] + fsuae_options)
|
||||
utils.run_command(['fs-uae'] + self.fsuae_options.list())
|
||||
os.chdir(curdir)
|
||||
return True
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class Wrapper(base.ArchiveBase):
|
||||
if not method():
|
||||
return False
|
||||
|
||||
if not self._run_emulator(self.fsuae_options.list()):
|
||||
if not self._run_emulator():
|
||||
return False
|
||||
|
||||
if self._get_saves_dir():
|
||||
|
||||
@@ -38,7 +38,7 @@ class Wrapper(base.Base):
|
||||
if not self._copy_conf():
|
||||
return False
|
||||
|
||||
if not self._run_emulator(self.fsuae_options.list()):
|
||||
if not self._run_emulator():
|
||||
return False
|
||||
|
||||
if self._get_saves_dir():
|
||||
|
||||
@@ -46,9 +46,9 @@ def usage():
|
||||
|
||||
def run():
|
||||
"""run wrapper module"""
|
||||
config_file, cmd_options = parse_args()
|
||||
config_file, fsuae_options = parse_args()
|
||||
|
||||
if 'help' in cmd_options:
|
||||
if 'help' in fsuae_options:
|
||||
usage()
|
||||
sys.exit(0)
|
||||
|
||||
@@ -63,7 +63,7 @@ def run():
|
||||
sys.stderr.write('Error: Configuration file have syntax issues\n')
|
||||
sys.exit(2)
|
||||
|
||||
wrapper_module = cmd_options.get(WRAPPER_KEY)
|
||||
wrapper_module = fsuae_options.get(WRAPPER_KEY)
|
||||
if not wrapper_module:
|
||||
wrapper_module = configuration.get(WRAPPER_KEY)
|
||||
|
||||
@@ -78,7 +78,7 @@ def run():
|
||||
"exists.\n" % wrapper_module)
|
||||
sys.exit(3)
|
||||
|
||||
if not wrapper.run(config_file, cmd_options, configuration):
|
||||
if not wrapper.run(config_file, fsuae_options, configuration):
|
||||
sys.exit(4)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user