0

Catch some additional UUID lookup errors from urllib2

This commit is contained in:
Andrew Chin
2014-04-10 19:52:50 -04:00
parent ae586a7d27
commit 8e5944d5c3

View File

@@ -165,7 +165,7 @@ def handlePlayers(rset, render, worldpath):
profile = json.loads(urllib2.urlopen(UUID_LOOKUP_URL + playername.replace('-','')).read())
if 'name' in profile:
playername = profile['name']
except ValueError:
except (ValueError, urllib2.URLError):
logging.warning("Unable to get player name for UUID %s", playername)
if isSinglePlayer:
playername = 'Player'