mirror of
https://github.com/gryf/fs-uae-wrapper.git
synced 2025-12-18 20:10:26 +01:00
Get rid of run function for every wrapper module
This commit is contained in:
@@ -73,13 +73,3 @@ class Wrapper(base.ArchiveBase):
|
||||
shutil.move(arch, self.arch_filepath)
|
||||
os.chdir(curdir)
|
||||
return True
|
||||
|
||||
|
||||
def run(config_file, fsuae_options, configuration):
|
||||
"""Run fs-uae with provided config file and options"""
|
||||
|
||||
runner = Wrapper(config_file, fsuae_options, configuration)
|
||||
try:
|
||||
return runner.run()
|
||||
finally:
|
||||
runner.clean()
|
||||
|
||||
@@ -46,13 +46,3 @@ class Wrapper(base.ArchiveBase):
|
||||
return self._save_save()
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def run(config_file, fsuae_options, configuration):
|
||||
"""Run fs-uae with provided config file and options"""
|
||||
|
||||
runner = Wrapper(config_file, fsuae_options, configuration)
|
||||
try:
|
||||
return runner.run()
|
||||
finally:
|
||||
runner.clean()
|
||||
|
||||
@@ -78,7 +78,14 @@ def run():
|
||||
"exists.\n" % wrapper_module)
|
||||
sys.exit(3)
|
||||
|
||||
if not wrapper.run(config_file, fsuae_options, configuration):
|
||||
runner = wrapper.Wrapper(config_file, fsuae_options, configuration)
|
||||
|
||||
try:
|
||||
exit_code = runner.run()
|
||||
finally:
|
||||
runner.clean()
|
||||
|
||||
if not exit_code:
|
||||
sys.exit(4)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user