Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pycomsdk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
com
pycomsdk
Commits
ebfc68c5
Commit
ebfc68c5
authored
Feb 26, 2022
by
Anton Pershin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with join_path in Host
parent
c6401bbc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
communication.py
comsdk/communication.py
+2
-1
edge.py
comsdk/edge.py
+4
-4
No files found.
comsdk/communication.py
View file @
ebfc68c5
...
...
@@ -38,6 +38,7 @@ class Host(object):
'if you want to use it.'
)
path_to_prog
=
self
.
programs
[
prog_name
]
if
path_to_prog
is
not
None
:
print
(
self
.
programs
[
prog_name
],
prog_name
)
return
self
.
join_path
(
self
.
programs
[
prog_name
],
prog_name
)
else
:
return
prog_name
...
...
@@ -78,7 +79,7 @@ class RemoteHost(Host):
self
.
set_job_id
=
aux
.
load_function_from_module
(
state
[
'job_setter'
])
self
.
check_task_finished
=
aux
.
load_function_from_module
(
state
[
'job_finished_checker'
])
def
join_path
(
self
,
path_list
):
def
join_path
(
self
,
*
path_list
):
# For RemoteHost, we assume that it is posix-based
return
'/'
.
join
(
path_list
)
...
...
comsdk/edge.py
View file @
ebfc68c5
...
...
@@ -124,8 +124,8 @@ class ExecutableProgramEdge(Edge):
trailing_args_keys
=
(),
# "local keys" where trailing args are stored
remote
=
False
,
stdout_processor
=
None
,
chaining_command_at_start
=
''
,
chaining_command_at_end
=
''
,
chaining_command_at_start
=
lambda
d
:
''
,
chaining_command_at_end
=
lambda
d
:
''
,
):
#predicate = predicate if predicate is not None else dummy_predicate
self
.
_output_dict
=
output_dict
...
...
@@ -145,8 +145,8 @@ class ExecutableProgramEdge(Edge):
args_str
=
build_args_line
(
data
,
self
.
_keyword_names
,
self
.
_flag_names
,
self
.
_trailing_args_keys
)
working_dir
=
data
[
self
.
_working_dir_key
]
stdout_lines
,
stderr_lines
=
self
.
_comm
.
execute_program
(
self
.
_program_name
,
args_str
,
working_dir
,
self
.
chaining_command_at_start
,
self
.
chaining_command_at_end
)
self
.
chaining_command_at_start
(
data
)
,
self
.
chaining_command_at_end
(
data
)
)
output_data
=
self
.
_output_dict
if
self
.
_stdout_processor
:
stdout_data
=
self
.
_stdout_processor
(
data
,
stdout_lines
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment