summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDiego Roversi <diegor@tiscali.it>2019-09-08 22:46:08 +0200
committerDiego Roversi <diegor@tiscali.it>2019-09-08 22:46:08 +0200
commit9ee7cd3b326aa923d0b5eaf21eececd4c8a9e16c (patch)
treef2262fbfa70a52692b7804e26b0d5259e9651b1c /common
parentc23b138ed72d794521b19ff7d8076b32b0b7bf46 (diff)
convert to bytestr, and fix relative import
Diffstat (limited to 'common')
-rw-r--r--common/hostchooser.py6
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: