diff options
author | Diego Roversi <diegor@tiscali.it> | 2019-09-08 22:46:08 +0200 |
---|---|---|
committer | Diego Roversi <diegor@tiscali.it> | 2019-09-08 22:46:08 +0200 |
commit | 9ee7cd3b326aa923d0b5eaf21eececd4c8a9e16c (patch) | |
tree | f2262fbfa70a52692b7804e26b0d5259e9651b1c /common | |
parent | c23b138ed72d794521b19ff7d8076b32b0b7bf46 (diff) |
convert to bytestr, and fix relative import
Diffstat (limited to 'common')
-rw-r--r-- | common/hostchooser.py | 6 |
1 files changed, 3 insertions, 3 deletions
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), ('<broadcast>', 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: |