1. Kang Zhang
  2. Python Keyring Lib

Commits

Jason R. Coombs  committed 3667e59

Use priority for sorting keyrings

  • Participants
  • Parent commits 6281d74
  • Branches prioritized backends

Comments (0)

Files changed (1)

File keyring/core.py

View file
     if keyring is None:
 
         keyrings = backend.get_all_keyring()
-        # rank according to the supported result
-        keyrings.sort(key = lambda x: -x.supported())
+        # rank by priority
+        keyrings.sort(key = lambda x: -x.priority)
         # get the most recommended one
         keyring = keyrings[0]