summaryrefslogtreecommitdiff
path: root/python/generator.cpp
diff options
context:
space:
mode:
authorJordan Wiens <github@psifertex.com>2025-11-11 00:11:20 -0500
committerAlexander Taylor <alex@vector35.com>2026-01-20 09:44:10 -0500
commite7bbb5129fd032310b2e2f710ce83945c03f5b13 (patch)
tree8206511abdce8f3107d95627e0c5e3f0c9c756d4 /python/generator.cpp
parentede18e23133ade890c533703bf68858c5ee84edd (diff)
handle None cases when empty strings are returned from the core and fix associated coreversion usage
Diffstat (limited to 'python/generator.cpp')
-rw-r--r--python/generator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/generator.cpp b/python/generator.cpp
index 4e8e71b0..a3d252c3 100644
--- a/python/generator.cpp
+++ b/python/generator.cpp
@@ -314,7 +314,7 @@ int main(int argc, char* argv[])
fprintf(out, " return var.encode(\"utf-8\")\n\n\n");
fprintf(out, "def pyNativeStr(arg: AnyStr) -> str:\n");
- fprintf(out, " if isinstance(arg, str):\n");
+ fprintf(out, " if arg is None or isinstance(arg, str):\n");
fprintf(out, " return arg\n");
fprintf(out, " else:\n");
fprintf(out, " try:\n");