Skip to content
Snippets Groups Projects
Commit daee2956 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Replace deprecated argument

parent 01ee2dc4
Branches
No related tags found
No related merge requests found
...@@ -75,14 +75,14 @@ def updateIndex(args:argparse.Namespace) -> None: ...@@ -75,14 +75,14 @@ def updateIndex(args:argparse.Namespace) -> None:
# Remove the element <li> for the document # Remove the element <li> for the document
if args.documentLink is not None and args.documentName is not None: if args.documentLink is not None and args.documentName is not None:
# Find the element to delete # Find the element to delete
element_to_delete = soup.find('li', text=args.documentName) element_to_delete = soup.find('li', string=args.documentName)
# Check if the element is found before attempting to delete it # Check if the element is found before attempting to delete it
if element_to_delete: if element_to_delete:
# Remove the element from the HTML tree # Remove the element from the HTML tree
element_to_delete.decompose() element_to_delete.decompose()
else: else:
print("Element not found.") print("Element not found.")
elif soup.find('li', text=args.documentName): elif soup.find('li', string=args.documentName):
print("'index.html' does already contain the entry") print("'index.html' does already contain the entry")
else: else:
# Find document list # Find document list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment