@@ -234,6 +234,8 @@ def export_table(db, table, directory, options, error_queue, progress_info, sind
234234
235235 writer = None
236236
237+ has_write_hooks = utils_common .check_minimum_version (options , '2.3.7' , False )
238+
237239 try :
238240 # -- get table info
239241
@@ -248,13 +250,14 @@ def export_table(db, table, directory, options, error_queue, progress_info, sind
248250
249251 sindex_counter .value += len (table_info ["indexes" ])
250252
251- table_info ['write_hook' ] = options .retryQuery (
252- 'table write hook data %s.%s' % (db , table ),
253- query .db (db ).table (table ).get_write_hook (),
254- run_options = {'binary_format' : 'raw' })
253+ if has_write_hooks :
254+ table_info ['write_hook' ] = options .retryQuery (
255+ 'table write hook data %s.%s' % (db , table ),
256+ query .db (db ).table (table ).get_write_hook (),
257+ run_options = {'binary_format' : 'raw' })
255258
256- if table_info ['write_hook' ] is not None :
257- hook_counter .value += 1
259+ if table_info ['write_hook' ] is not None :
260+ hook_counter .value += 1
258261
259262 with open (os .path .join (directory , db , table + '.info' ), 'w' ) as info_file :
260263 info_file .write (json .dumps (table_info ) + "\n " )
0 commit comments