Loading updateIndex.py +2 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
updateIndex.py +2 −2 Original line number Diff line number Diff line Loading @@ -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 Loading