Skip to content
Browse files

Merge pull request #24 from rouault/master

Avoid exception if grids table doesn't exist
  • Loading branch information...
2 parents 3340e9d + 41fad1d commit 4affcbca3ed0b2a8121c140f35c0cde2bcd5ea18 @springmeyer springmeyer committed Jan 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 mbutil/util.py
View
2 mbutil/util.py
@@ -221,10 +221,10 @@ def mbtiles_to_disk(mbtiles_file, directory_path, **kwargs):
t = tiles.fetchone()
# grids
- count = con.execute('select count(zoom_level) from grids;').fetchone()[0]
done = 0
msg =''
try:
+ count = con.execute('select count(zoom_level) from grids;').fetchone()[0]
grids = con.execute('select zoom_level, tile_column, tile_row, grid from grids;')
g = grids.fetchone()
except sqlite3.OperationalError:

0 comments on commit 4affcbc

Please sign in to comment.
Something went wrong with that request. Please try again.