Skip to content

Commit

Permalink
Merge pull request boramalper#99 from pigmonkey/tile-check
Browse files Browse the repository at this point in the history
bail out on missing "no image" tiles
  • Loading branch information
boramalper authored Apr 10, 2018
2 parents 1091e40 + 3149e82 commit ee237b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions himawaripy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def download_chunk(args):

tiledata = download(url)

# If the tile data is 2867 bytes, it is a blank "No Image" tile.
if tiledata.__sizeof__() == 2867:
print('No image available for {}.'.format(strftime("%Y/%m/%d %H:%M:%S", latest)))
os._exit(3)

with counter.get_lock():
counter.value += 1
if counter.value == level * level:
Expand Down

0 comments on commit ee237b4

Please sign in to comment.