Skip to content

Commit

Permalink
ignore first line
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhil1697 committed Apr 16, 2024
1 parent 57b471f commit 78a7662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kubemarine/kubernetes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def drain_nodes(group: NodeGroup, disable_eviction: bool = False,
node_name = node.get_node_name()

# Split stdout into lines
stdout_lines = stdout.split('\n')
stdout_lines = stdout.split('\n')[1:]
# Check if node_name exactly matches any line
if node_name in stdout_lines:
log.debug("Draining node %s..." % node_name)
Expand Down Expand Up @@ -305,7 +305,7 @@ def delete_nodes(group: NodeGroup) -> RunnersGroupResult:
node_name = node.get_node_name()

# Split stdout into lines
stdout_lines = stdout.split('\n')
stdout_lines = stdout.split('\n')[1:]
# Check if node_name exactly matches any line
if node_name in stdout_lines:
log.debug("Deleting node %s from the cluster..." % node_name)
Expand Down

0 comments on commit 78a7662

Please sign in to comment.