File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change
1
+ v23.11.0
2
+ --------
3
+
4
+ * #603: In ``libsecret ``, check that the service is available before
5
+ declaring viability.
6
+
1
7
v23.10.0
2
8
--------
3
9
Original file line number Diff line number Diff line change 7
7
from ..errors import (
8
8
PasswordDeleteError ,
9
9
PasswordSetError ,
10
- ExceptionRaisedContext ,
11
10
KeyringLocked ,
12
11
)
13
12
@@ -50,10 +49,15 @@ def collection(self):
50
49
51
50
@properties .classproperty
52
51
def priority (cls ):
53
- with ExceptionRaisedContext () as exc :
54
- Secret .__name__
55
- if exc :
52
+ if not available :
56
53
raise RuntimeError ("libsecret required" )
54
+
55
+ # Make sure there is actually a secret service running
56
+ try :
57
+ Secret .Service .get_sync (Secret .ServiceFlags .OPEN_SESSION , None )
58
+ except GLib .Error as error :
59
+ raise RuntimeError ("Can't open a session to the secret service" ) from error
60
+
57
61
return 4.8
58
62
59
63
def get_password (self , service , username ):
You can’t perform that action at this time.
0 commit comments