Lgndr: Make the decorator compatible with python 3.9
Revert this once we move to python `>=3.10`
This commit is contained in:
parent
f361828f37
commit
90acf4b9ce
|
@ -59,7 +59,7 @@ class LegendaryCLI(LegendaryCLIReal):
|
|||
def resolve_aliases(self, name):
|
||||
return super(LegendaryCLI, self)._resolve_aliases(name)
|
||||
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def install_game(self, args: LgndrInstallGameArgs) -> Optional[Tuple[DLManager, AnalysisResult, InstalledGame, Game, bool, Optional[str], ConditionCheckResult]]:
|
||||
# Override logger for the local context to use message as part of the indirect return value
|
||||
logger = LgndrIndirectLogger(args.indirect_status, self.logger)
|
||||
|
@ -230,7 +230,7 @@ class LegendaryCLI(LegendaryCLIReal):
|
|||
return dlm, analysis, igame, game, args.repair_mode, repair_file, res
|
||||
|
||||
# Rare: This is currently handled in DownloadThread, this is a trial
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def install_game_real(self, args: LgndrInstallGameRealArgs, dlm: DLManager, game: Game, igame: InstalledGame) -> LgndrInstallGameRealRet:
|
||||
# Override logger for the local context to use message as part of the indirect return value
|
||||
logger = LgndrIndirectLogger(args.indirect_status, self.logger)
|
||||
|
@ -316,7 +316,7 @@ class LegendaryCLI(LegendaryCLIReal):
|
|||
|
||||
return ret
|
||||
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def install_game_cleanup(self, game: Game, igame: InstalledGame, repair_mode: bool = False, repair_file: str = '') -> None:
|
||||
# Override logger for the local context to use message as part of the indirect return value
|
||||
logger = LgndrIndirectLogger(LgndrIndirectStatus(), self.logger)
|
||||
|
@ -387,7 +387,7 @@ class LegendaryCLI(LegendaryCLIReal):
|
|||
else:
|
||||
logger.info('Automatic installation not available on Linux.')
|
||||
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def uninstall_game(self, args: LgndrUninstallGameArgs) -> None:
|
||||
# Override logger for the local context to use message as part of the indirect return value
|
||||
logger = LgndrIndirectLogger(args.indirect_status, self.logger, logging.WARNING)
|
||||
|
@ -563,7 +563,7 @@ class LegendaryCLI(LegendaryCLIReal):
|
|||
logger.info(f'Run "legendary repair {args.app_name}" to repair your game installation.')
|
||||
return len(failed), len(missing)
|
||||
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def import_game(self, args: LgndrImportGameArgs) -> None:
|
||||
# Override logger for the local context to use message as part of the indirect return value
|
||||
logger = LgndrIndirectLogger(args.indirect_status, self.logger)
|
||||
|
@ -668,11 +668,11 @@ class LegendaryCLI(LegendaryCLIReal):
|
|||
logger.info(f'{"DLC" if game.is_dlc else "Game"} "{game.app_title}" has been imported.')
|
||||
return
|
||||
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def egs_sync(self, args):
|
||||
return super(LegendaryCLI, self).egs_sync(args)
|
||||
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def move(self, args):
|
||||
# Override logger for the local context to use message as part of the indirect return value
|
||||
logger = LgndrIndirectLogger(args.indirect_status, self.logger)
|
||||
|
|
|
@ -98,7 +98,7 @@ class LegendaryCore(LegendaryCoreReal):
|
|||
finally:
|
||||
pass
|
||||
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def egl_import(self, app_name):
|
||||
try:
|
||||
super(LegendaryCore, self).egl_import(app_name)
|
||||
|
@ -144,7 +144,7 @@ class LegendaryCore(LegendaryCoreReal):
|
|||
if delete_files:
|
||||
delete_folder(os.path.join(igame.install_path, '.egstore'))
|
||||
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def egl_export(self, app_name):
|
||||
try:
|
||||
super(LegendaryCore, self).egl_export(app_name)
|
||||
|
@ -153,7 +153,7 @@ class LegendaryCore(LegendaryCoreReal):
|
|||
finally:
|
||||
pass
|
||||
|
||||
@unlock_installed
|
||||
@unlock_installed.__func__
|
||||
def egl_sync(self, app_name=''):
|
||||
try:
|
||||
super(LegendaryCore, self).egl_sync(app_name)
|
||||
|
|
Loading…
Reference in a new issue