Browse Source

exception handling

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
ec36893dbe
  1. 7
      minetestmapper-numpy.py

7
minetestmapper-numpy.py

@ -464,11 +464,12 @@ class LVLDB:
def __iter__(self):
for k in self.conn.RangeIter():
if k is not None and len(k)>0:
#if k is not None and len(k)>0:
try:
x, y, z = getIntegerAsBlock(int(k[0]))
yield x, y, z, k[0]
else:
print("WARNING: no data at first index in value '"+str(k))
except:
print("WARNING: no int at first index in value '"+str(k))
def get(self, pos):
return BytesIO(self.conn.Get(pos))

Loading…
Cancel
Save