Commit daee2956 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Replace deprecated argument

parent 01ee2dc4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -75,14 +75,14 @@ def updateIndex(args:argparse.Namespace) -> None:
        # Remove the element <li> for the document
        if args.documentLink is not None and args.documentName is not None:
            # 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
            if element_to_delete:
                # Remove the element from the HTML tree
                element_to_delete.decompose()
            else:
                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")
    else:
        # Find document list