diff --git a/Source/JavaScriptCore/generate-bytecode-files b/Source/JavaScriptCore/generate-bytecode-files
index c5dab429c7b0f..af3431275ecf9 100644
--- a/Source/JavaScriptCore/generate-bytecode-files
+++ b/Source/JavaScriptCore/generate-bytecode-files
@@ -163,7 +163,7 @@ if __name__ == "__main__":
         initBytecodesFile = openOrExit(initASMFileName, "w")
 
     try:
-        bytecodeSections = json.load(bytecodeFile, encoding = "utf-8")
+        bytecodeSections = json.load(bytecodeFile)
     except:
         print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info()))
 
diff --git a/Source/JavaScriptCore/Scripts/generate-js-builtins.py b/Source/JavaScriptCore/Scripts/generate-js-builtins.py
index 7a203ff0874cb..66b8963262450 100644
--- a/Source/JavaScriptCore/Scripts/generate-js-builtins.py
+++ b/Source/JavaScriptCore/Scripts/generate-js-builtins.py
@@ -124,7 +124,7 @@ def generate_bindings_for_builtins_files(builtins_files=[],
     cli_parser.add_option("-t", "--test", action="store_true", help="Enable test mode.")
 
     arg_options, arg_values = cli_parser.parse_args()
-    if len(arg_values) is 0 and not arg_options.input_directory:
+    if len(arg_values) == 0 and not arg_options.input_directory:
         raise ParseException("At least one input file or directory expected.")
 
     if not arg_options.output_directory:
