Merge "Python 3 fixes"
This commit is contained in:
commit
d39c2678ff
|
@ -173,7 +173,7 @@ class SparkJobEngine(base_engine.JobEngine):
|
|||
job_configs.get('configs', {})):
|
||||
path = 'service/edp/resources/edp-spark-wrapper.jar'
|
||||
name = 'builtin-%s.jar' % uuidutils.generate_uuid()
|
||||
builtin_libs = [{'raw': files.get_file_text(path),
|
||||
builtin_libs = [{'raw': files.try_get_file_text(path),
|
||||
'name': name}]
|
||||
|
||||
uploaded_paths = []
|
||||
|
|
|
@ -276,7 +276,11 @@ def _get_http_client(host, port, proxy_command=None, gateway_host=None,
|
|||
|
||||
|
||||
def _write_fl(sftp, remote_file, data):
|
||||
write_data = paramiko.py3compat.StringIO(data)
|
||||
try:
|
||||
write_data = paramiko.py3compat.StringIO(data)
|
||||
except TypeError:
|
||||
write_data = paramiko.py3compat.BytesIO(data)
|
||||
|
||||
sftp.putfo(write_data, remote_file)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue