Fix python syntax warning 32/270532/4
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 4 Feb 2022 17:04:56 +0000 (02:04 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 11 May 2022 11:35:26 +0000 (20:35 +0900)
/usr/lib/python3.9/site-packages/nltk/parse/malt.py:206: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if ret is not 0:

Change-Id: I48096b5f0a088c1c05b8f3007d104400432ce2fd
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
nlp_resource_data/nltk/parse/malt.py

index 5ce4f9a2fd48b21004f8fcdf694fb02e95f24f64..5c238f51438dd709a4da7670f2ea6663039db667 100644 (file)
@@ -203,7 +203,7 @@ class MaltParser(ParserI):
                 ret = self._execute(cmd, verbose)  # Run command.
                 os.chdir(_current_path)  # Change back to current path.
 
-                if ret is not 0:
+                if ret != 0:
                     raise Exception(
                         "MaltParser parsing (%s) failed with exit "
                         "code %d" % (' '.join(cmd), ret)