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(
286
286
mimetype : str = "text/plain;charset=UTF-8" ,
287
287
):
288
288
# 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 " )
293
291
if not self .disable_metadata_checks :
294
292
self .validate_metadata (name , value )
295
293
@@ -387,7 +385,6 @@ def add_item_for(
387
385
duplicate_ok : bool | None = None ,
388
386
callback : Callable | tuple [Callable , Any ] | None = None ,
389
387
index_data : IndexData | None = None ,
390
- * ,
391
388
auto_index : bool = True ,
392
389
):
393
390
"""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