dbufstat: Fix warnings with Python 3.8

Replace "is" with "==" and "is not" with "!=".

Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11394
This commit is contained in:
Ryan Moeller 2020-12-23 18:10:35 -05:00 committed by GitHub
parent 4879c4d198
commit 8fbd31d761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ elif sys.platform.startswith("linux"):
def print_incompat_helper(incompat): def print_incompat_helper(incompat):
cnt = 0 cnt = 0
for key in sorted(incompat): for key in sorted(incompat):
if cnt is 0: if cnt == 0:
sys.stderr.write("\t") sys.stderr.write("\t")
elif cnt > 8: elif cnt > 8:
sys.stderr.write(",\n\t") sys.stderr.write(",\n\t")
@ -662,7 +662,7 @@ def main():
if not ifile: if not ifile:
ifile = default_ifile() ifile = default_ifile()
if ifile is not "-": if ifile != "-":
try: try:
tmp = open(ifile, "r") tmp = open(ifile, "r")
sys.stdin = tmp sys.stdin = tmp