Skip to content

Commit 35e45c1

Browse files
authored
Merge pull request #77 from chennes/initializeVariableSuccess
Ensure success variable is initialized
2 parents 9e01075 + e60efc9 commit 35e45c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addonmanager_installer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ def __init__(self, addon: Addon, allow_list: List[str] = None):
148148
def run(self, install_method: InstallationMethod = InstallationMethod.ANY) -> bool:
149149
"""Install an addon. Returns True if the addon was installed, or False if not. Emits
150150
either success or failure prior to returning."""
151+
success = False
151152
try:
152153
addon_url = self.addon_to_install.url.replace(os.path.sep, "/")
153154
method_to_use = self._determine_install_method(addon_url, install_method)
154-
success = False
155155
if method_to_use == InstallationMethod.ZIP:
156156
success = self._install_by_zip()
157157
elif method_to_use == InstallationMethod.GIT:
@@ -166,7 +166,7 @@ def run(self, install_method: InstallationMethod = InstallationMethod.ANY) -> bo
166166
except utils.ProcessInterrupted:
167167
pass
168168
except Exception as e:
169-
fci.Console.PrintLog(e + "\n")
169+
fci.Console.PrintLog(str(e) + "\n")
170170
success = False
171171
if success:
172172
if (

0 commit comments

Comments
 (0)