From 75720ce5eb36259aa1f9f472ab8c84cb1cb2b93c Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 28 Mar 2017 18:01:23 +0200 Subject: [PATCH] Update dynamic.py allow non-ascii chars in MSG files --- src/genpy/dynamic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/genpy/dynamic.py b/src/genpy/dynamic.py index cccfd73..07eff76 100644 --- a/src/genpy/dynamic.py +++ b/src/genpy/dynamic.py @@ -165,7 +165,8 @@ def generate_dynamic(core_type, msg_cat): # write the entire text to a file and import it (it will get deleted when tmp_dir goes - above) tmp_file = tempfile.NamedTemporaryFile(suffix=".py",dir=tmp_dir,delete=False) - tmp_file.file.write(full_text.encode()) + #tmp_file.file.write(full_text.encode()) + tmp_file.file.write(full_text) tmp_file.file.close() # import our temporary file as a python module, which requires modifying sys.path