Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mlx_fs_dump SyntaxWarning "is" / "is not" with a literal #31

Open
davehouser1 opened this issue Apr 28, 2022 · 0 comments
Open

mlx_fs_dump SyntaxWarning "is" / "is not" with a literal #31

davehouser1 opened this issue Apr 28, 2022 · 0 comments

Comments

@davehouser1
Copy link

When running mlx_fs_dump only python 3.9.5, I see the following syntax warnings:

# ./mlx_fs_dump -v
./mlx_fs_dump:294: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if (i % 2) and (cr is not "0"):
./mlx_fs_dump:306: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if node.dst_type is not "0":
./mlx_fs_dump:310: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if node.dst_vhca_id_valid is not 0:
./mlx_fs_dump:319: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if (i % 2) and (cr is not "0"):
./mlx_fs_dump:324: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if cr is "IPv4":
./mlx_fs_dump:340: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if index is not -1:
./mlx_fs_dump:351: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if index is not -1:
./mlx_fs_dump:446: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if match_enable is "NO_MATCH":
usage: mlx_fs_dump [-h] -d DEVICE [-g GVMI] [-c COLOR] [-f IN_FILE]
mlx_fs_dump: error: the following arguments are required: -d

Solution was to adjust all is not to != and all is to ==.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant