openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csantan...@apache.org
Subject [incubator-openwhisk] branch master updated: Add support for Java actions. (#3117)
Date Tue, 19 Dec 2017 23:49:03 GMT
This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 760b163  Add support for Java actions. (#3117)
760b163 is described below

commit 760b1634816666e8c3ca8f53235cd6e9dc07e2b7
Author: rodric rabbah <rodric@gmail.com>
AuthorDate: Tue Dec 19 18:48:59 2017 -0500

    Add support for Java actions. (#3117)
---
 actionRuntimes/actionProxy/invoke.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/actionRuntimes/actionProxy/invoke.py b/actionRuntimes/actionProxy/invoke.py
index 2fb54a6..b4957f5 100755
--- a/actionRuntimes/actionProxy/invoke.py
+++ b/actionRuntimes/actionProxy/invoke.py
@@ -33,6 +33,7 @@ import os
 import re
 import sys
 import json
+import base64
 import requests
 import codecs
 import traceback
@@ -90,9 +91,10 @@ def init(args):
     main = args.main
     artifact = args.artifact
 
-    if artifact and (artifact.endswith('.zip') or artifact.endswith('tgz')):
+    if artifact and (artifact.endswith('.zip') or artifact.endswith('tgz') or artifact.endswith('jar')):
         with open(artifact, 'rb') as fp:
-            contents = fp.read().encode('base64')
+            contents = fp.read()
+        contents = base64.b64encode(contents)
         binary = True
     elif artifact is not '':
         with(codecs.open(artifact, 'r', 'utf-8')) as fp:

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <commits@openwhisk.apache.org>'].

Mime
View raw message