Skip to content

Commit

Permalink
chore: allow the case when sn get fail
Browse files Browse the repository at this point in the history
  • Loading branch information
wudihechao authored May 20, 2024
1 parent a9ae8c1 commit 447f4b4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions config/hostname.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ func (c *HostInfoCache) update() {
HostInfo.SetIP(fmt.Sprint(ip))
}
sn, err := GetBiosSn()
if err != nil {
log.Println("E! failed to get sn:", err)
} else {
if err == nil {
HostInfo.SetSN(sn)
}
}
Expand Down

0 comments on commit 447f4b4

Please sign in to comment.