summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2023-03-17 20:20:54 +0800
committerGitHub <noreply@github.com>2023-03-17 14:20:54 +0200
commit2dd5c3a180a9892c339b66f76cc203f8b0f6fe5a (patch)
tree0ff465c4e71135ca3355f98e49e76498e8c2ef9d /utils
parentd0da0a6a3f2a599720be0e51272ef831b07b9dd2 (diff)
downloadredis-2dd5c3a180a9892c339b66f76cc203f8b0f6fe5a.tar.gz
Minor fix to print, set to str (#11934)
* Minor fix to print, set to str `{commands_filename}` the extra {} actually make it become a Set, and the output print was like this: ``` Processing json files... Linking container command to subcommands... Checking all commands... Generating {'commands'}.c... All done, exiting. ``` Introduced in #11920 * more fix
Diffstat (limited to 'utils')
-rwxr-xr-xutils/generate-command-code.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/generate-command-code.py b/utils/generate-command-code.py
index ce1128e06..81d8c19f1 100755
--- a/utils/generate-command-code.py
+++ b/utils/generate-command-code.py
@@ -252,11 +252,11 @@ class ReplySchema(object):
self.schema = {}
if desc.get("type") == "object":
if desc.get("properties") and desc.get("additionalProperties") is None:
- print("%s: Any object that has properties should have the additionalProperties field" % {self.name})
+ print("%s: Any object that has properties should have the additionalProperties field" % self.name)
exit(1)
elif desc.get("type") == "array":
if desc.get("items") and isinstance(desc["items"], list) and any([desc.get(k) is None for k in ["minItems", "maxItems"]]):
- print("%s: Any array that has items should have the minItems and maxItems fields" % {self.name})
+ print("%s: Any array that has items should have the minItems and maxItems fields" % self.name)
exit(1)
for k, v in desc.items():
if isinstance(v, dict):
@@ -543,7 +543,7 @@ if check_command_error_counter != 0:
exit(1)
commands_filename = "commands_with_reply_schema" if args.with_reply_schema else "commands"
-print("Generating %s.c..." % {commands_filename})
+print("Generating %s.c..." % commands_filename)
with open("%s/%s.c" % (srcdir, commands_filename), "w") as f:
f.write("/* Automatically generated by %s, do not edit. */\n\n" % os.path.basename(__file__))
f.write("#include \"server.h\"\n")