From c9a0635cb7b507b54371596aac9aee699c8cabdc Mon Sep 17 00:00:00 2001 From: Daniel Johnson Date: Sun, 1 Jan 2023 09:29:13 -0500 Subject: [PATCH] Fix use of None in the extras field by initializing it to []. --- lutris/installer/interpreter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lutris/installer/interpreter.py b/lutris/installer/interpreter.py index 964e68eb0..1cd14ea18 100644 --- a/lutris/installer/interpreter.py +++ b/lutris/installer/interpreter.py @@ -71,7 +71,7 @@ class ScriptInterpreter(GObject.Object, CommandsMixin): self.game_dir_created = False # Whether a game folder was created during the install # Extra files for installers, either None if the extras haven't been checked yet. # Or a list of IDs of extras to be downloaded during the install - self.extras = None + self.extras = [] self.game_disc = None self.game_files = {} self.cancelled = False @@ -312,7 +312,7 @@ class ScriptInterpreter(GObject.Object, CommandsMixin): os.makedirs(self.cache_path, exist_ok=True) # Copy extras to game folder - if len(self.extras) and len(self.extras) == len(self.installer.files): + if self.extras and len(self.extras) == len(self.installer.files): # Reset the install script in case there are only extras. logger.warning("Installer with only extras and no game files") self.installer.script["installer"] = []