mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
fix python script to catch relay.py errors
This commit is contained in:
parent
89809e051d
commit
afbf5a2218
1 changed files with 5 additions and 1 deletions
|
@ -272,7 +272,11 @@ class Device():
|
|||
def send_dead(self):
|
||||
JSON = json.dumps([{'relayID': self.relayID, 'seed': self.relaySeed}])
|
||||
url = 'http://%s/xw4/relay.py/kill' % (self.args.HOST)
|
||||
req = requests.get(url, params = {'params' : JSON})
|
||||
params = {'params' : JSON}
|
||||
try:
|
||||
req = requests.get(url, params = params) # failing
|
||||
except requests.exceptions.ConnectionError:
|
||||
print('got exception sending to', url, params, '; is relay.py running as apache module?')
|
||||
|
||||
def getTilesCount(self):
|
||||
return {'index': self.indx, 'nTilesLeft': self.nTilesLeft,
|
||||
|
|
Loading…
Reference in a new issue