Permalink
Browse files

fail callback gracefully when mimetype not present

  • Loading branch information...
1 parent 0f7bbb8 commit b30d7346f2085b16dab0f5c72f82ea685b8dad99 @nvkelso nvkelso committed Apr 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 scripts/tilestache-seed.py
@@ -331,7 +331,7 @@ def parseConfigfile(configpath):
status_code, headers, content = getTile(layer, coord, extension, options.ignore_cached)
mimetype = headers['Content-Type']
- if 'json' in mimetype and options.callback:
+ if mimetype and 'json' in mimetype and options.callback:
js_path = '%s/%d/%d/%d.js' % (layer.name(), coord.zoom, coord.column, coord.row)
js_body = '%s(%s);' % (options.callback, content)
js_size = len(js_body) / 1024

0 comments on commit b30d734

Please sign in to comment.