Description: Fix SyntaxWarnings (using is comparing strings)
Author: Nick Morrott <nickm@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985022
Forwarded: not-needed
Applied-Upstream: https://github.com/ARMmbed/mbed-os-tools/commit/9fd3e86f50967c374d968b06b508d6aeec31ac1c
Last-Update: 2022-02-06
---
--- a/mbed_lstools/lstools_base.py
+++ b/mbed_lstools/lstools_base.py
@@ -361,9 +361,9 @@
                     '-' remove mid from mocking entry
         @return Mocked structure (json format)
         """
-        if oper is '+':
+        if oper == '+':
             self.plat_db.add(mid, platform_name, permanent=True)
-        elif oper is '-':
+        elif oper == '-':
             self.plat_db.remove(mid, permanent=True)
         else:
             raise ValueError("oper can only be [+-]")
--- a/mbed_lstools/platform_database.py
+++ b/mbed_lstools/platform_database.py
@@ -501,7 +501,7 @@
         as a dict.
         """
         logger.debug("Trying remove of %s", id)
-        if id is '*' and device_type in self._dbs[self._prim_db]:
+        if id == '*' and device_type in self._dbs[self._prim_db]:
             self._dbs[self._prim_db][device_type] = {}
         for db in self._dbs.values():
             if device_type in db and id in db[device_type]:
