From d27e33a2060b3ed85c76dc2f310dab34d31a324f Mon Sep 17 00:00:00 2001 From: Fabian Wood Date: Sat, 1 Aug 2020 17:50:37 +1000 Subject: [PATCH] Fixed runtime error from changes in qt addons.py Changes to meet returning of Iterable (rather than List), meant returning a different variable, but that may not have been created. Reverted, changing to return List. --- qt/aqt/addons.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt/aqt/addons.py b/qt/aqt/addons.py index 032071c98..4da2b57d8 100644 --- a/qt/aqt/addons.py +++ b/qt/aqt/addons.py @@ -179,7 +179,7 @@ class AddonManager: sys.path.insert(0, self.addonsFolder()) # in new code, you may want all_addon_meta() instead - def allAddons(self) -> Iterable[str]: + def allAddons(self) -> List[str]: l = [] for d in os.listdir(self.addonsFolder()): path = self.addonsFolder(d) @@ -188,8 +188,8 @@ class AddonManager: l.append(d) l.sort() if os.getenv("ANKIREVADDONS", ""): - it = reversed(l) - return it + l = list(reversed(l)) + return l def all_addon_meta(self) -> Iterable[AddonMeta]: return map(self.addon_meta, self.allAddons())