@@ -251,7 +251,7 @@ def create_symlink(self, extract_root: Path, output_path: Path, inode: FileHeade
251251 target_path = extract_root .joinpath (target ).resolve ()
252252
253253 if not is_safe_path (extract_root , target_path ):
254- logger .warn (
254+ logger .warning (
255255 "Path traversal attempt through symlink." , target_path = target_path
256256 )
257257 return
@@ -268,24 +268,26 @@ def create_hardlink(self, extract_root: Path, link_path: Path, inode: FileHeader
268268 try :
269269 os .link (target_path , link_path )
270270 except FileNotFoundError :
271- logger .warn (
271+ logger .warning (
272272 "Hard link target does not exist, discarding." ,
273273 target_path = target_path ,
274274 link_path = link_path ,
275275 )
276276 except PermissionError :
277- logger .warn (
277+ logger .warning (
278278 "Not enough privileges to create hardlink to block/char device, discarding." ,
279279 target_path = target_path ,
280280 link_path = link_path ,
281281 )
282282 else :
283- logger .warn ("Invalid hard link target" , inode_key = inode .spec_info )
283+ logger .warning ("Invalid hard link target" , inode_key = inode .spec_info )
284284
285285 def create_inode (self , extract_root : Path , inode : FileHeader ):
286286 output_path = extract_root .joinpath (inode .path ).resolve ()
287287 if not is_safe_path (extract_root , inode .path ):
288- logger .warn ("Path traversal attempt, discarding." , output_path = output_path )
288+ logger .warning (
289+ "Path traversal attempt, discarding." , output_path = output_path
290+ )
289291 return
290292 logger .info ("dumping inode" , inode = inode , output_path = str (output_path ))
291293
@@ -314,7 +316,7 @@ def dump_fs(self):
314316 self .create_inode (self .extract_root , inode )
315317
316318 if os .geteuid () != 0 :
317- logger .warn (
319+ logger .warning (
318320 "root privileges are required to create block and char devices, skipping."
319321 )
320322 else :
0 commit comments