def _write_to_lmdb(db, key, value):
 success = False
 while (not success):
  txn = db.begin(write=True)
  try:
   txn.put(key, value)
   txn.commit()
   success = True
  except lmdb.MapFullError:
   txn.abort()
   curr_limit = db.info()['map_size']
   new_limit = (curr_limit * 2)
   db.set_mapsize(new_limit)

def _write_to_lmdb ( db , key , value ) : success = False while ( not success ) : txn = db . begin ( write = True ) try : txn . put ( key , value ) txn . commit ( ) success = True except lmdb . MapFullError : txn . abort ( ) curr_limit = db . info ( ) [ 'map_size' ] new_limit = ( curr_limit * 2 ) db . set_mapsize ( new_limit )
write to db .