Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
workflow
pypushflow
Commits
9dd7f39a
Commit
9dd7f39a
authored
Apr 07, 2020
by
payno
Browse files
[PythonActor] add workaround in python actor to take script.py
parent
6267921c
Changes
1
Hide whitespace changes
Inline
Side-by-side
pypushflow/PythonActor.py
View file @
9dd7f39a
...
...
@@ -189,8 +189,10 @@ class PythonActor(AbstractActor):
# Import script
self
.
script
=
script
if
script
is
not
None
:
module
=
importlib
.
import_module
(
os
.
path
.
splitext
(
script
)[
0
])
node
=
Node
(
'.'
.
join
((
module
.
__name__
,
'run'
)))
# module = importlib.import_module(os.path.splitext(script)[0])
if
script
.
endswith
(
'.py'
):
script
=
''
.
join
(
os
.
path
.
splitext
(
script
)[:
-
1
])
node
=
Node
(
'.'
.
join
((
script
,
'run'
)))
self
.
actor_wrapper
=
ActorWrapper
(
node
=
node
)
else
:
self
.
actor_wrapper
=
ActorWrapper
(
node
=
node
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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