From 71d2c5fe4a129b2f6ea56d4421a5c4dba1d54737 Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Sat, 27 Jul 2024 11:54:49 -0400 Subject: [PATCH] flatpak: Use a set() instead of array when gathering locale variants. Minor optimization - This prevents having duplicates of locale names - if the locale is 'de', you'd end up with the initial 'de', then the single variant added would also be 'de'. --- .../python3/dist-packages/mintcommon/installer/_flatpak.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/lib/python3/dist-packages/mintcommon/installer/_flatpak.py b/usr/lib/python3/dist-packages/mintcommon/installer/_flatpak.py index 37a82d5..d39b864 100644 --- a/usr/lib/python3/dist-packages/mintcommon/installer/_flatpak.py +++ b/usr/lib/python3/dist-packages/mintcommon/installer/_flatpak.py @@ -189,9 +189,9 @@ def update_xmlb_info(self): return locale = self.as_pool.get_locale() - locale_variants = [locale] + locale_variants = {locale} for v in GLib.get_locale_variants(locale): - locale_variants.append(locale_to_bcp47(v)) + locale_variants.add(locale_to_bcp47(v)) for comp_id in self.app_dict.keys(): try: