Make it so that we can import thefuzz or fuzzywuzzy depending on which

one is available.
This commit is contained in:
Jonathan Lestrelin 2021-10-02 04:39:53 +02:00
parent 4f7c68a636
commit 1f7a548e87

View File

@ -31,8 +31,13 @@ from os.path import join as path_join
import dbus.service
from dbus.mainloop.glib import DBusGMainLoop
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
try:
from thefuzz import fuzz
from thefuzz import process
except ModuleNotFoundError:
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
from gi.repository import GLib
# Convenience shorthand for declaring dbus interface methods.