Skip to content

Commit 19dceaa

Browse files
committed
Fixed api output for build=False mvexel#93
1 parent 33fddc9 commit 19dceaa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

overpass/api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,13 @@ def get(self,
8181
for row in reader:
8282
result.append(row)
8383
return result
84-
elif content_type == "text/xml" or content_type == "application/xml":
84+
elif content_type in ("text/xml", "application/xml", "application/osm3s+xml"):
8585
return r.text
86+
elif content_type == "application/json":
87+
response = json.loads(r.text)
8688

87-
response = json.loads(r.text)
89+
if not build:
90+
return response
8891

8992
# Check for valid answer from Overpass.
9093
# A valid answer contains an 'elements' key at the root level.

0 commit comments

Comments
 (0)