Skip to content

Commit

Permalink
fixup! Add Python 3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Apr 4, 2016
1 parent ebb8647 commit 18c6cca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tilecloud_chain/amazon.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ def run_local(cmd):

logger.debug('Run: %s.' % ' '.join([quote(c) for c in cmd]))
result = Popen(cmd, stdout=PIPE, stderr=PIPE).communicate()
if PY3:
result = [r.decode('utf-8') for r in result]

if len(result[0]) != 0: # pragma: no cover
logger.info(result[0])
if len(result[1]) != 0:
Expand Down
2 changes: 1 addition & 1 deletion tilecloud_chain/openlayers_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
doc = request.responseText;
}
var capabilities = format.read(doc);
{% for layer in layers) %}
{% for layer in layers %}
map.addLayer(format.createLayer(capabilities, {
layer: "{{layer['name']}}",
maxExtent: {{layer.maxExtent}},{%
Expand Down

0 comments on commit 18c6cca

Please sign in to comment.