Skip to content

Commit

Permalink
device: fix bug in hidpp20 get host names
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Feb 21, 2024
1 parent 05b4890 commit d801d07
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/logitech_receiver/hidpp20.py
Original file line number Diff line number Diff line change
Expand Up @@ -1764,11 +1764,11 @@ def get_host_names(device):
else:
remaining = 0
host_names[host] = (bool(status), name)
# update the current host's name if it doesn't match the system name
hostname = socket.gethostname().partition(".")[0]
if host_names[currentHost][1] != hostname:
set_host_name(device, hostname, host_names[currentHost][1])
host_names[currentHost] = (host_names[currentHost][0], hostname)
if host_names: # update the current host's name if it doesn't match the system name
hostname = socket.gethostname().partition(".")[0]
if host_names[currentHost][1] != hostname:
set_host_name(device, hostname, host_names[currentHost][1])
host_names[currentHost] = (host_names[currentHost][0], hostname)
return host_names


Expand Down

0 comments on commit d801d07

Please sign in to comment.