[ARVADOS] updated: 1.3.0-153-g07782f174

Git user git at public.curoverse.com
Tue Jan 15 09:47:05 EST 2019


Summary of changes:
 sdk/cwl/arvados_cwl/executor.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

       via  07782f1743267638c996cb1d9bb3a85f24c8243e (commit)
      from  e17fe40c08651f39bc42468b1b2b56841bbaf223 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 07782f1743267638c996cb1d9bb3a85f24c8243e
Author: Eric Biagiotti <ebiagiotti at veritasgenetcs.com>
Date:   Tue Jan 15 09:46:50 2019 -0500

    13306: Updates ArvCwlExecutor to properly convert objects to JSON in unicode
    
    json.dumps produces a str object in python 2 (bytestring) and a str object in python 3 (unicode), resulting in incompatibility when writing to the file (expects unicode). In order to prevent using py2 and py3 specific code, the solution is to call encode, which will force the string to be bytes in both languages, then decode to unicode from there.
    
    Arvados-DCO-1.1-Signed-off-by:  Eric Biagiotti <ebiagiotti at veritasgenetics.com>

diff --git a/sdk/cwl/arvados_cwl/executor.py b/sdk/cwl/arvados_cwl/executor.py
index 92e8727aa..ffbc6a439 100644
--- a/sdk/cwl/arvados_cwl/executor.py
+++ b/sdk/cwl/arvados_cwl/executor.py
@@ -462,7 +462,8 @@ http://doc.arvados.org/install/install-api-server.html#disable_api_methods
         adjustFileObjs(outputObj, rewrite)
 
         with final.open("cwl.output.json", "w") as f:
-            json.dump(outputObj, f, sort_keys=True, indent=4, separators=(',',': '))
+            res = json.dumps(outputObj, sort_keys=True, indent=4, separators=(',',': '), ensure_ascii=False).encode('utf-8').decode()
+            f.write(res)           
 
         final.save_new(name=name, owner_uuid=self.project_uuid, storage_classes=storage_classes, ensure_unique_name=True)
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list