@@ -256,10 +256,10 @@ def _download_file_to(file_url, destination_folder, new_file_name=None):
256256
257257
258258def _save_data_as (data , destination_folder , file_name ):
259- download_file_lock = fasteners .InterProcessLock (
260- constants .MultiBrowser .DOWNLOAD_FILE_LOCK
259+ file_io_lock = fasteners .InterProcessLock (
260+ constants .MultiBrowser .FILE_IO_LOCK
261261 )
262- with download_file_lock :
262+ with file_io_lock :
263263 out_file = codecs .open (
264264 os .path .join (destination_folder , file_name ), "w+" , encoding = "utf-8"
265265 )
@@ -268,10 +268,10 @@ def _save_data_as(data, destination_folder, file_name):
268268
269269
270270def _append_data_to_file (data , destination_folder , file_name ):
271- download_file_lock = fasteners .InterProcessLock (
272- constants .MultiBrowser .DOWNLOAD_FILE_LOCK
271+ file_io_lock = fasteners .InterProcessLock (
272+ constants .MultiBrowser .FILE_IO_LOCK
273273 )
274- with download_file_lock :
274+ with file_io_lock :
275275 existing_data = ""
276276 if os .path .exists (os .path .join (destination_folder , file_name )):
277277 with open (os .path .join (destination_folder , file_name ), "r" ) as f :
@@ -286,10 +286,10 @@ def _append_data_to_file(data, destination_folder, file_name):
286286
287287
288288def _get_file_data (folder , file_name ):
289- download_file_lock = fasteners .InterProcessLock (
290- constants .MultiBrowser .DOWNLOAD_FILE_LOCK
289+ file_io_lock = fasteners .InterProcessLock (
290+ constants .MultiBrowser .FILE_IO_LOCK
291291 )
292- with download_file_lock :
292+ with file_io_lock :
293293 if not os .path .exists (os .path .join (folder , file_name )):
294294 raise Exception ("File not found!" )
295295 with open (os .path .join (folder , file_name ), "r" ) as f :
0 commit comments