Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Specification Tools
Scripts
Commits
daee2956
Commit
daee2956
authored
1 year ago
by
Miguel Angel Reina Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Replace deprecated argument
parent
01ee2dc4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
updateIndex.py
+2
-2
2 additions, 2 deletions
updateIndex.py
with
2 additions
and
2 deletions
updateIndex.py
+
2
−
2
View file @
daee2956
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment