From 9ee7cd3b326aa923d0b5eaf21eececd4c8a9e16c Mon Sep 17 00:00:00 2001 From: Diego Roversi Date: Sun, 8 Sep 2019 22:46:08 +0200 Subject: convert to bytestr, and fix relative import --- common/hostchooser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/hostchooser.py') diff --git a/common/hostchooser.py b/common/hostchooser.py index 2953f4c..7dea833 100644 --- a/common/hostchooser.py +++ b/common/hostchooser.py @@ -3,8 +3,8 @@ import time, select, sys from errno import ETIMEDOUT UDP_PORT = 8056 -PING_MESSAGE = "pclient-game-ping" -PONG_MESSAGE = "server-game-pong" +PING_MESSAGE = b"pclient-game-ping" +PONG_MESSAGE = b"server-game-pong" def serverside_ping(only_port=None): @@ -75,7 +75,7 @@ def pick(hostlist, delay=1): def find_servers(hostlist=[('127.0.0.1', None), ('', None)], tries=2, delay=0.5, verbose=1, port_needed=1): - from . import gamesrv + import gamesrv if verbose: print('Looking for servers in the following list:', file=sys.stderr) for host, udpport in hostlist: -- cgit v1.2.3