Skip to content

Commit

Permalink
Merge branch 'remove-unnecessary-decode-ascii' into 'master'
Browse files Browse the repository at this point in the history
Remove unnecessary decode('ascii')

See merge request i4/infra/wake-on-lan!1
  • Loading branch information
Flowdalic committed Aug 29, 2022
2 parents 09fcfcd + 411e569 commit 661eebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wol.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def handle(self):
logging.debug('Connected {}'.format(client))
try:
while self.rfile:
hostname = self.rfile.readline().decode('ascii').strip()
hostname = self.rfile.readline().strip()
if hostname:
logging.info('Request WoL at "{}" from {}'.format(hostname, client))
self.wfile.write(b"success\n" if wake(hostname) else b"failed\n")
Expand Down

0 comments on commit 661eebb

Please sign in to comment.