Skip to content

Commit

Permalink
caching bug fixed: tiles without data can also be cached
Browse files Browse the repository at this point in the history
a warning will be logged
  • Loading branch information
mnboos committed May 23, 2017
1 parent 05d0127 commit f0f731d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion file_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_cached_tile(file_name):
@staticmethod
def cache_tile(tile, file_name):
if not tile.decoded_data:
raise RuntimeError("only decoded tiles can be cached")
warn("Trying to cache a tile without data: {}", tile)

file_path = os.path.join(FileHelper.get_cache_directory(), file_name)
try:
Expand Down
1 change: 1 addition & 0 deletions vt_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def _decode_binary_tile_data(self, data):
:param data:
:return:
"""
decoded_data = None
if data:
try:
is_gzipped = FileHelper.is_gzipped(data)
Expand Down

0 comments on commit f0f731d

Please sign in to comment.