mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-02 09:47:00 +03:00
Less log information when executing commands
git-svn-id: http://svn.opennebula.org/one/trunk@423 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
15538a8ee5
commit
74072b54a3
@ -59,8 +59,6 @@ class GenericCommand
|
|||||||
# +data+: variable to pass to the callaback to provide data
|
# +data+: variable to pass to the callaback to provide data
|
||||||
# or to share with other callbacks
|
# or to share with other callbacks
|
||||||
def run(data=nil)
|
def run(data=nil)
|
||||||
log("About to execute #{command}")
|
|
||||||
|
|
||||||
std = execute
|
std = execute
|
||||||
|
|
||||||
# Close standard IO descriptors
|
# Close standard IO descriptors
|
||||||
@ -78,12 +76,11 @@ class GenericCommand
|
|||||||
|
|
||||||
@code=get_exit_code(@stderr)
|
@code=get_exit_code(@stderr)
|
||||||
|
|
||||||
log("Command executed, exit code: #{@code}")
|
|
||||||
|
|
||||||
@callback.call(self, data) if @callback
|
@callback.call(self, data) if @callback
|
||||||
|
|
||||||
if @code!=0
|
if @code!=0
|
||||||
log("Command execution fail. STDERR follows.")
|
log("Command execution fail: #{command}")
|
||||||
|
log("STDERR follows.")
|
||||||
log(@stderr)
|
log(@stderr)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user