mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
fix conversion panic
This commit is contained in:
parent
f01ea3fdb7
commit
ac7701af79
1 changed files with 2 additions and 2 deletions
|
@ -27,8 +27,8 @@ func GetLinks(dbusConn dbus.Conn) ([]Link, error) {
|
|||
|
||||
for _, link := range links {
|
||||
name := link[1].(string)
|
||||
path := link[2].(string)
|
||||
linkObj := dbusConn.Object("org.freedesktop.network1", dbus.ObjectPath(path))
|
||||
path := link[2].(dbus.ObjectPath)
|
||||
linkObj := dbusConn.Object("org.freedesktop.network1", path)
|
||||
carrierState, err := linkObj.GetProperty("CarrierState")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("GetProperty CarrierState %w", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue