aboutsummaryrefslogtreecommitdiffhomepage
path: root/dbus
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-27 23:52:38 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-27 23:52:38 +0900
commit84d8c27b5f17ab8567b0b3667d95030f022a44e7 (patch)
tree092a38254299d1dbdb96b68531ba65e10fda7ea6 /dbus
parentee2f5ed6ac2a9b19c9c5135e263bc60397843d44 (diff)
dbus: return exported error for nil config
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbus.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/dbus/dbus.go b/dbus/dbus.go
index 70151cfb..7a51d98c 100644
--- a/dbus/dbus.go
+++ b/dbus/dbus.go
@@ -22,6 +22,10 @@ type Proxy struct {
lock sync.RWMutex
}
+var (
+ ErrConfig = errors.New("no configuration to seal")
+)
+
func (p *Proxy) String() string {
if p == nil {
return "(invalid dbus proxy)"
@@ -51,7 +55,7 @@ func (p *Proxy) Seal(session, system *Config) error {
}
if session == nil && system == nil {
- return errors.New("no configuration to seal")
+ return ErrConfig
}
var args []string