Make it so that we can import thefuzz or fuzzywuzzy depending on which
one is available.
This commit is contained in:
parent
4f7c68a636
commit
1f7a548e87
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user