File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -164,8 +164,12 @@ def __base_update_handler(self, event):
164
164
if event .is_directory :
165
165
return
166
166
167
+ # skip deleted/non-existent paths
168
+ if not (path := Path (event .src_path )).exists ():
169
+ logging .warning ("Observed change to non-existent path, %s, doing nothing" , path )
170
+ return
171
+
167
172
# do not process output files if in a nested dir
168
- path = Path (event .src_path )
169
173
if STATIC_SERVER_ROOT in path .parents or any (d in IGNORED_DIRS for d in path .parents ):
170
174
return
171
175
@@ -246,8 +250,7 @@ def build_html(path):
246
250
integrity = "sha512-DSycG/J5pRCjy6wZ8nfeqaKuSAf9jVmSulTuzy1xQL+2yyBIp7fwzNvx+tZCtZ6kIRMqiDyWOYSl4zYjT32zOw==" , crossorigin = "anonymous" ))
247
251
output = str (soup )
248
252
except AttributeError :
249
- output = f"ERROR: Malformed or non-existent html in '{ path } '. Doing nothing."
250
- logging .error (output )
253
+ logging .warning (output := f"Malformed or non-existent html in '{ path } '. Doing nothing." )
251
254
252
255
resolve_output_path (path ).write_text (output )
253
256
You can’t perform that action at this time.
0 commit comments