Commits

Thomas Kluyver  committed cbd7b75

Fix for set_password with unicode on Secret Service backend

  • Participants
  • Parent commits 9ff6779
  • Branches py3-secret-service

Comments (0)

Files changed (1)

File keyring/backend.py

             "username": username
             }
         _, session = service_iface.OpenSession("plain", "")
+        
+        if isinstance(password, unicode):
+            password = password.encode('utf-8')
         secret = dbus.Struct(
             (session, "", dbus.ByteArray(password), "text/plain"))
         properties = {