Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libsubmit/channels/local/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def push_file(self, source, dest_dir):
- FileCopyException : If file copy failed.
'''

local_dest = dest_dir + '/' + os.path.basename(source)
local_dest = os.path.join(dest_dir, os.path.basename(source))

# Only attempt to copy if the target dir and source dir are different
if os.path.dirname(source) != dest_dir:
Expand Down
2 changes: 1 addition & 1 deletion libsubmit/channels/ssh/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def pull_file(self, remote_source, local_dir):
- FileCopyException : FileCopy failed.
'''

local_dest = local_dir + '/' + os.path.basename(remote_source)
local_dest = os.path.join(local_dir, os.path.basename(remote_source))

try:
os.makedirs(local_dir)
Expand Down
3 changes: 2 additions & 1 deletion libsubmit/providers/cluster_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ def _write_submit_script(self, template, script_filename, job_name, configs):

try:
submit_script = Template(template).substitute(jobname=job_name, **configs)
submit_script = submit_script.replace("\r\n", "\n")
# submit_script = Template(template).safe_substitute(jobname=job_name, **configs)
with open(script_filename, 'w') as f:
with open(script_filename, 'wb') as f:
f.write(submit_script)

except KeyError as e:
Expand Down