File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -286,10 +286,8 @@ def add_metadata(
286286 mimetype : str = "text/plain;charset=UTF-8" ,
287287 ):
288288 # drop control characters before passing them to libzim
289- if isinstance (content , str ):
290- content = UNWANTED_CONTROL_CHARACTERS_REGEX .sub ("" , content ).strip (
291- " \r \n \t "
292- )
289+ if isinstance (value , str ):
290+ value = UNWANTED_CONTROL_CHARACTERS_REGEX .sub ("" , value ).strip (" \r \n \t " )
293291 if not self .disable_metadata_checks :
294292 self .validate_metadata (name , value )
295293
@@ -387,7 +385,6 @@ def add_item_for(
387385 duplicate_ok : bool | None = None ,
388386 callback : Callable | tuple [Callable , Any ] | None = None ,
389387 index_data : IndexData | None = None ,
390- * ,
391388 auto_index : bool = True ,
392389 ):
393390 """Add a File or content at a specified path and get its path
You can’t perform that action at this time.
0 commit comments