genPOI: code style fixes
E129 can suck me off. Get a better syntax, Python.
This commit is contained in:
@@ -286,7 +286,9 @@ class PlayerDict(dict):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
profile = json.loads(urllib.request.urlopen(UUID_LOOKUP_URL + sname).read().decode("utf-8"))
|
profile = json.loads(
|
||||||
|
urllib.request.urlopen(UUID_LOOKUP_URL + sname).read().decode("utf-8")
|
||||||
|
)
|
||||||
if 'name' in profile:
|
if 'name' in profile:
|
||||||
profile['retrievedAt'] = time.mktime(time.localtime())
|
profile['retrievedAt'] = time.mktime(time.localtime())
|
||||||
PlayerDict.uuid_cache[sname] = profile
|
PlayerDict.uuid_cache[sname] = profile
|
||||||
@@ -437,8 +439,8 @@ def create_marker_from_filter_result(poi, result):
|
|||||||
d["createInfoWindow"] = result['createInfoWindow']
|
d["createInfoWindow"] = result['createInfoWindow']
|
||||||
|
|
||||||
# Polylines and polygons
|
# Polylines and polygons
|
||||||
if ('polyline' in result and hasattr(result['polyline'], '__iter__')) or \
|
if (('polyline' in result and hasattr(result['polyline'], '__iter__')) or
|
||||||
'polygon' in result and hasattr(result['polygon'], '__iter__'):
|
'polygon' in result and hasattr(result['polygon'], '__iter__')):
|
||||||
# If the points form a line or closed shape
|
# If the points form a line or closed shape
|
||||||
d['isLine'] = 'polyline' in result
|
d['isLine'] = 'polyline' in result
|
||||||
# Collect points
|
# Collect points
|
||||||
|
|||||||
Reference in New Issue
Block a user