Commit 88981904 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by Vincent A

weboob command: Avoid duplicate entries and put GUIs at the end

I'm not sure how I get duplicate entries on my system (I get them for
bank), since I can't reproduce it with local_run. But this shouldn't hurt.
parent 2c16ca16
......@@ -69,7 +69,15 @@ class Weboob(ConsoleApplication):
cap = self.choose_capability(capApplicationDict)
def appsortkey(app):
appname = app.APPNAME
if appname.startswith('q') or appname.endswith('-qt'):
return '1' + appname
return '0' + appname
applications = capApplicationDict[cap]
applications = sorted(set(applications), key=appsortkey)
application = applications[0] if len(applications) == 1 else self.choose_application(applications)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment