Description: fix "is" with a literal warning
Author: Mitsuya Shibata <mty.shibata@gmail.com>
Forwarded: no
Reviewed-By: Xavier Guimard <yadd@debian.org>
Last-Update: 2020-11-07

--- a/pylib/gyp/generator/cmake.py
+++ b/pylib/gyp/generator/cmake.py
@@ -41,7 +41,7 @@
 try:
   # maketrans moved to str in python3.
   _maketrans = string.maketrans
-except NameError:
+except AttributeError:
   _maketrans = str.maketrans
 
 generator_default_variables = {
@@ -987,7 +987,7 @@
 
     # XCode settings
     xcode_settings = config.get('xcode_settings', {})
-    for xcode_setting, xcode_value in xcode_settings.viewitems():
+    for xcode_setting, xcode_value in xcode_settings.items():
       SetTargetProperty(output, cmake_target_name,
                         "XCODE_ATTRIBUTE_%s" % xcode_setting, xcode_value,
                         '' if isinstance(xcode_value, str) else ' ')
--- a/pylib/gyp/input.py
+++ b/pylib/gyp/input.py
@@ -1183,7 +1183,7 @@
       if variable_name in variables:
         # If the variable is already set, don't set it.
         continue
-      if the_dict_key is 'variables' and variable_name in the_dict:
+      if the_dict_key == 'variables' and variable_name in the_dict:
         # If the variable is set without a % in the_dict, and the_dict is a
         # variables dict (making |variables| a varaibles sub-dict of a
         # variables dict), use the_dict's definition.
