Skip to content

Commit

Permalink
network: Remove white space when filtering errors
Browse files Browse the repository at this point in the history
Signed-off-by: Pineda <[email protected]>
  • Loading branch information
jpineda3 committed Dec 12, 2024
1 parent 82a787d commit 32362ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nebula/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,12 @@ def check_dmesg(self, error_on_warnings=False):
res = os.path.join(path, "resources", "err_rejects.txt")
with open(res) as f:
error_rejects = f.readlines()
error_rejects_no_ws = [s.replace(" ", "").replace("\n","") for s in error_rejects]
error_rejects_no_ws = [s.replace(" ", "").replace("\n", "") for s in error_rejects]

error_log_filetered = []
for i in error_log:
log = re.sub(r"^\[[\s\.\d]*\] ", "", i)
log_no_ws = log.replace(" ", "").replace("\n","")
log_no_ws = log.replace(" ", "").replace("\n", "")

if log not in error_rejects and log_no_ws not in error_rejects_no_ws:
error_log_filetered.append(i)
Expand Down

0 comments on commit 32362ac

Please sign in to comment.