Catch some additional UUID lookup errors from urllib2
This commit is contained in:
@@ -165,7 +165,7 @@ def handlePlayers(rset, render, worldpath):
|
|||||||
profile = json.loads(urllib2.urlopen(UUID_LOOKUP_URL + playername.replace('-','')).read())
|
profile = json.loads(urllib2.urlopen(UUID_LOOKUP_URL + playername.replace('-','')).read())
|
||||||
if 'name' in profile:
|
if 'name' in profile:
|
||||||
playername = profile['name']
|
playername = profile['name']
|
||||||
except ValueError:
|
except (ValueError, urllib2.URLError):
|
||||||
logging.warning("Unable to get player name for UUID %s", playername)
|
logging.warning("Unable to get player name for UUID %s", playername)
|
||||||
if isSinglePlayer:
|
if isSinglePlayer:
|
||||||
playername = 'Player'
|
playername = 'Player'
|
||||||
|
|||||||
Reference in New Issue
Block a user