Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-node
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-node
Commits
8f4db351
Commit
8f4db351
authored
May 25, 2012
by
Anael Beutot
Browse files
Options
Downloads
Patches
Plain Diff
Log exception when doing a remote execution.
parent
3f80f0a0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ccnode/host/__init__.py
+6
-2
6 additions, 2 deletions
ccnode/host/__init__.py
with
6 additions
and
2 deletions
ccnode/host/__init__.py
+
6
−
2
View file @
8f4db351
...
@@ -52,8 +52,12 @@ class Handler(BasePlugin):
...
@@ -52,8 +52,12 @@ class Handler(BasePlugin):
:param string command: shell command to run
:param string command: shell command to run
"""
"""
# return stdout and stderr mixed in
# return stdout and stderr mixed in
try
:
return
Popen
(
command
,
shell
=
True
,
bufsize
=-
1
,
stdin
=
PIPE
,
stdout
=
PIPE
,
return
Popen
(
command
,
shell
=
True
,
bufsize
=-
1
,
stdin
=
PIPE
,
stdout
=
PIPE
,
stderr
=
STDOUT
).
communicate
()[
0
]
or
None
stderr
=
STDOUT
).
communicate
()[
0
]
or
None
except
Exception
:
logger
.
exception
(
'
Error while executing a remote command
'
)
raise
def
node_shutdown
(
self
,
reboot
=
True
,
gracefull
=
True
):
def
node_shutdown
(
self
,
reboot
=
True
,
gracefull
=
True
):
"""
Halt/Reboot the node.
"""
Halt/Reboot the node.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
sign in
to comment