File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ def _poll(self):
218218 break
219219 self ._file_times = new_times
220220 if changed :
221+ os .sync ()
221222 self ._reloader ()
222223
223224 def _check_file_times (self ):
Original file line number Diff line number Diff line change @@ -119,11 +119,8 @@ def make_temp_file(content):
119119 return path
120120
121121def replace_file (path , content ):
122- log .error ('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ making a new temp file' )
123- temp_path = make_temp_file (content )
124- log .error ('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ renaming temp file from %s to %s' % (temp_path , path ))
125- os .rename (temp_path , path )
126- log .error ('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ done' )
122+ with open ('path' , 'w' ) as f :
123+ f .write (content )
127124
128125def test_does_not_load_data_prior_to_start ():
129126 path = make_temp_file ('{"flagValues":{"key":"value"}}' )
You can’t perform that action at this time.
0 commit comments