Group :: System/Kernel and hardware
RPM: mlnx-tools
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: mlnx-tools-5.2.0-alt-syntax.patch
Download
Download
From 3bfcd727102fff0e9f3d07be1be04b1f2750f034 Mon Sep 17 00:00:00 2001
From: Leontiy Volodin <lvol@altlinux.org>
Date: Tue, 23 Nov 2021 16:40:31 +0300
Subject: [PATCH] syntax
---
python/mlx_fs_dump | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/python/mlx_fs_dump b/python/mlx_fs_dump
index 2155070..3a80d71 100755
--- a/python/mlx_fs_dump
+++ b/python/mlx_fs_dump
@@ -291,7 +291,7 @@ def printFg(node):
for i, cr in enumerate(node.cr_found):
# Only print cr with none 0 value
- if (i % 2) and (cr is not "0"):
+ if (i % 2) and (cr != "0"):
cr_name = node.cr_found[i-1]
ret += pad + cr_name + "|"
pad = ""
@@ -303,25 +303,25 @@ def printFte(node):
is_ipv4 = False
close_dest = False
- if node.dst_type is not "0":
+ if node.dst_type != "0":
ret += "to (" + node.dst_type + ":" + node.dst_value
close_dest = True
- if node.dst_vhca_id_valid is not 0:
+ if node.dst_vhca_id_valid != 0:
ret += " VHCA:" + node.dst_vhca_id
close_dest = True
if close_dest:
ret += ") "
for i, cr in enumerate(node.cr_found):
# Only print cr with none 0 value
- if (i % 2) and (cr is not "0"):
+ if (i % 2) and (cr != "0"):
cr_name = node.cr_found[i-1]
if "ethtype" in cr_name:
try:
cr = eth_type[cr]
- if cr is "IPv4":
+ if cr == "IPv4":
is_ipv4 = True
except KeyError:
pass
@@ -337,7 +337,7 @@ def printFte(node):
except ValueError:
index = -1
- if index is not -1:
+ if index != -1:
cr = cr.zfill(8) + node.cr_found[index+1].lstrip("0x").zfill(4)
node.cr_found[index] = "0"
node.cr_found[index+1] = "0"
@@ -348,7 +348,7 @@ def printFte(node):
except ValueError:
index = -1
- if index is not -1:
+ if index != -1:
cr = cr.zfill(8) + node.cr_found[index+1].lstrip("0x").zfill(4)
node.cr_found[index] = "0"
node.cr_found[index+1] = "0"
@@ -443,7 +443,7 @@ class fancy_dump():
for i in range(0, len(fte_match)):
if (match_enable_int & (1 << i)):
- if match_enable is "NO_MATCH":
+ if match_enable == "NO_MATCH":
match_enable = ""
match_enable = match_enable + pad + fte_match[i]
pad = " "
--
libgit2 1.1.1