File tree 2 files changed +3
-5
lines changed
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ def _poll(self):
218
218
break
219
219
self ._file_times = new_times
220
220
if changed :
221
+ os .sync ()
221
222
self ._reloader ()
222
223
223
224
def _check_file_times (self ):
Original file line number Diff line number Diff line change @@ -119,11 +119,8 @@ def make_temp_file(content):
119
119
return path
120
120
121
121
def 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 )
127
124
128
125
def test_does_not_load_data_prior_to_start ():
129
126
path = make_temp_file ('{"flagValues":{"key":"value"}}' )
You can’t perform that action at this time.
0 commit comments