Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
settingsd
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
settingsd
Commits
4498bce4
Commit
4498bce4
authored
Nov 15, 2010
by
Devaev Maxim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved raising SubprocessFailure to tools module
parent
d1d97e64
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
70 deletions
+29
-70
fmod_common_info.py
plugins/functions/fmod_common_info.py
+2
-14
fmod_disks_smart.py
plugins/functions/fmod_disks_smart.py
+3
-15
fmod_machine.py
plugins/functions/fmod_machine.py
+4
-11
fmod_ntp_config.py
plugins/functions/fmod_ntp_config.py
+1
-5
fmod_system_services.py
plugins/functions/fmod_system_services.py
+9
-24
tools.py
settingsd/tools.py
+10
-1
No files found.
plugins/functions/fmod_common_info.py
View file @
4498bce4
...
@@ -94,23 +94,11 @@ class CommonInfo(service.FunctionObject) :
...
@@ -94,23 +94,11 @@ class CommonInfo(service.FunctionObject) :
def
lsbOption
(
self
,
option
)
:
def
lsbOption
(
self
,
option
)
:
proc_args
=
"
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"lsb_release_prog_path"
),
option
)
proc_args
=
"
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"lsb_release_prog_path"
),
option
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
return
":"
.
join
(
tools
.
execProcess
(
proc_args
)[
0
]
.
split
(
":"
)[
1
:])
.
strip
()
if
proc_returncode
!=
0
:
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
return
":"
.
join
(
proc_stdout
.
split
(
":"
)[
1
:])
.
strip
()
def
unameOption
(
self
,
option
)
:
def
unameOption
(
self
,
option
)
:
proc_args
=
"
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"uname_prog_path"
),
option
)
proc_args
=
"
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"uname_prog_path"
),
option
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
return
tools
.
execProcess
(
proc_args
)[
0
]
.
strip
()
if
proc_returncode
!=
0
:
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
return
proc_stdout
.
strip
()
##### Public classes #####
##### Public classes #####
...
...
plugins/functions/fmod_disks_smart.py
View file @
4498bce4
...
@@ -37,15 +37,10 @@ class Disk(service.FunctionObject) :
...
@@ -37,15 +37,10 @@ class Disk(service.FunctionObject) :
@service.functionMethod
(
SMART_METHODS_NAMESPACE
,
out_signature
=
"a(isiiiissss)"
)
@service.functionMethod
(
SMART_METHODS_NAMESPACE
,
out_signature
=
"a(isiiiissss)"
)
def
attributes
(
self
)
:
def
attributes
(
self
)
:
proc_args
=
"
%
s -A
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"smartctl_prog_path"
),
self
.
__device_file_path
)
proc_args
=
"
%
s -A
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"smartctl_prog_path"
),
self
.
__device_file_path
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
if
proc_returncode
!=
0
:
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
attrs_list
=
[]
attrs_list
=
[]
attrs_found_flag
=
False
attrs_found_flag
=
False
for
attrs_list_item
in
proc_stdout
.
split
(
"
\n
"
)
:
for
attrs_list_item
in
tools
.
execProcess
(
proc_args
)[
0
]
.
split
(
"
\n
"
)
:
attrs_list_item
=
attrs_list_item
.
strip
()
attrs_list_item
=
attrs_list_item
.
strip
()
if
attrs_found_flag
:
if
attrs_found_flag
:
...
@@ -69,15 +64,10 @@ class Disk(service.FunctionObject) :
...
@@ -69,15 +64,10 @@ class Disk(service.FunctionObject) :
@service.functionMethod
(
SMART_METHODS_NAMESPACE
,
out_signature
=
"b"
)
@service.functionMethod
(
SMART_METHODS_NAMESPACE
,
out_signature
=
"b"
)
def
health
(
self
)
:
def
health
(
self
)
:
proc_args
=
"
%
s -H
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"smartctl_prog_path"
),
self
.
__device_file_path
)
proc_args
=
"
%
s -H
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"smartctl_prog_path"
),
self
.
__device_file_path
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
if
proc_returncode
!=
0
:
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
disk_health_flag
=
False
disk_health_flag
=
False
health_found_flag
=
False
health_found_flag
=
False
for
health_list_item
in
proc_stdout
.
split
(
"
\n
"
)
:
for
health_list_item
in
tools
.
execProcess
(
proc_args
)[
0
]
.
split
(
"
\n
"
)
:
health_list_item
=
health_list_item
.
strip
()
health_list_item
=
health_list_item
.
strip
()
if
health_found_flag
:
if
health_found_flag
:
...
@@ -150,10 +140,8 @@ class Service(service.Service) :
...
@@ -150,10 +140,8 @@ class Service(service.Service) :
### Private ###
### Private ###
def
smartAvailable
(
self
,
device_file_path
)
:
def
smartAvailable
(
self
,
device_file_path
)
:
# FIXME: Add normal checking for SMART support
proc_args
=
"
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"smartctl_prog_path"
),
device_file_path
)
proc_args
=
"
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"smartctl_prog_path"
),
device_file_path
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
return
not
bool
(
tools
.
execProcess
(
proc_args
,
False
)[
2
])
return
not
bool
(
proc_returncode
)
###
###
...
...
plugins/functions/fmod_machine.py
View file @
4498bce4
...
@@ -17,9 +17,6 @@ RUNLEVELS_METHODS_NAMESPACE = "runlevels"
...
@@ -17,9 +17,6 @@ RUNLEVELS_METHODS_NAMESPACE = "runlevels"
RUNLEVELS
=
"0123456"
RUNLEVELS
=
"0123456"
SHUTDOWN_OPTION_HALT
=
"-h"
SHUTDOWN_OPTION_REBOOT
=
"-r"
##### Private classes #####
##### Private classes #####
class
Machine
(
service
.
FunctionObject
)
:
class
Machine
(
service
.
FunctionObject
)
:
...
@@ -28,13 +25,11 @@ class Machine(service.FunctionObject) :
...
@@ -28,13 +25,11 @@ class Machine(service.FunctionObject) :
@service.functionMethod
(
POWER_METHODS_NAMESPACE
,
out_signature
=
"i"
)
@service.functionMethod
(
POWER_METHODS_NAMESPACE
,
out_signature
=
"i"
)
def
shutdown
(
self
)
:
def
shutdown
(
self
)
:
proc_args
=
"
%
s
%
s now"
%
(
config
.
value
(
SERVICE_NAME
,
"shutdown_prog_path"
),
SHUTDOWN_OPTION_HALT
)
return
tools
.
execProcess
(
"
%
s -h now"
%
(
config
.
value
(
SERVICE_NAME
,
"shutdown_prog_path"
)))[
2
]
return
tools
.
execProcess
(
proc_args
)[
2
]
@service.functionMethod
(
POWER_METHODS_NAMESPACE
,
out_signature
=
"i"
)
@service.functionMethod
(
POWER_METHODS_NAMESPACE
,
out_signature
=
"i"
)
def
reboot
(
self
)
:
def
reboot
(
self
)
:
proc_args
=
"
%
s
%
s now"
%
(
config
.
value
(
SERVICE_NAME
,
"shutdown_prog_path"
),
SHUTDOWN_OPTION_REBOOT
)
return
tools
.
execProcess
(
"
%
s -r now"
%
(
config
.
value
(
SERVICE_NAME
,
"shutdown_prog_path"
)))[
2
]
return
tools
.
execProcess
(
proc_args
)[
2
]
@service.functionMethod
(
POWER_METHODS_NAMESPACE
,
out_signature
=
"i"
)
@service.functionMethod
(
POWER_METHODS_NAMESPACE
,
out_signature
=
"i"
)
def
suspend
(
self
)
:
def
suspend
(
self
)
:
...
@@ -54,9 +49,8 @@ class Machine(service.FunctionObject) :
...
@@ -54,9 +49,8 @@ class Machine(service.FunctionObject) :
@service.functionMethod
(
RUNLEVELS_METHODS_NAMESPACE
,
out_signature
=
"i"
)
@service.functionMethod
(
RUNLEVELS_METHODS_NAMESPACE
,
out_signature
=
"i"
)
def
currentLevel
(
self
)
:
def
currentLevel
(
self
)
:
proc_args
=
config
.
value
(
SERVICE_NAME
,
"runlevel_prog_path"
)
proc_args
=
config
.
value
(
SERVICE_NAME
,
"runlevel_prog_path"
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
level_pairs_list
=
proc_stdout
.
strip
()
.
split
(
" "
)
level_pairs_list
=
tools
.
execProcess
(
proc_args
)[
0
]
.
strip
()
.
split
(
" "
)
if
len
(
level_pairs_list
)
!=
2
or
not
level_pairs_list
[
1
]
in
RUNLEVELS
:
if
len
(
level_pairs_list
)
!=
2
or
not
level_pairs_list
[
1
]
in
RUNLEVELS
:
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
...
@@ -66,9 +60,8 @@ class Machine(service.FunctionObject) :
...
@@ -66,9 +60,8 @@ class Machine(service.FunctionObject) :
@service.functionMethod
(
RUNLEVELS_METHODS_NAMESPACE
,
out_signature
=
"i"
)
@service.functionMethod
(
RUNLEVELS_METHODS_NAMESPACE
,
out_signature
=
"i"
)
def
previousLevel
(
self
)
:
def
previousLevel
(
self
)
:
proc_args
=
config
.
value
(
SERVICE_NAME
,
"runlevel_prog_path"
)
proc_args
=
config
.
value
(
SERVICE_NAME
,
"runlevel_prog_path"
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
level_pairs_list
=
proc_stdout
.
strip
()
.
split
(
" "
)
level_pairs_list
=
tools
.
execProcess
(
proc_args
)[
0
]
.
strip
()
.
split
(
" "
)
if
len
(
level_pairs_list
)
!=
2
or
not
level_pairs_list
[
1
]
in
RUNLEVELS
+
"N"
:
if
len
(
level_pairs_list
)
!=
2
or
not
level_pairs_list
[
1
]
in
RUNLEVELS
+
"N"
:
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
...
...
plugins/functions/fmod_ntp_config.py
View file @
4498bce4
...
@@ -59,11 +59,7 @@ class NtpConfig(service.FunctionObject) :
...
@@ -59,11 +59,7 @@ class NtpConfig(service.FunctionObject) :
@service.functionMethod
(
NTP_METHODS_NAMESPACE
)
@service.functionMethod
(
NTP_METHODS_NAMESPACE
)
def
request
(
self
)
:
def
request
(
self
)
:
proc_args
=
"
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"ntpdate_prog_path"
),
" "
.
join
(
self
.
servers
()))
proc_args
=
"
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"ntpdate_prog_path"
),
" "
.
join
(
self
.
servers
()))
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
tools
.
execProcess
(
proc_args
)
if
proc_returncode
!=
0
:
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
##### Public classes #####
##### Public classes #####
...
...
plugins/functions/fmod_system_services.py
View file @
4498bce4
...
@@ -48,13 +48,9 @@ class SystemService(service.FunctionObject) :
...
@@ -48,13 +48,9 @@ class SystemService(service.FunctionObject) :
@service.functionMethod
(
SYSTEM_SERVICE_METHODS_NAMESPACE
,
out_signature
=
"s"
)
@service.functionMethod
(
SYSTEM_SERVICE_METHODS_NAMESPACE
,
out_signature
=
"s"
)
def
levelsMap
(
self
)
:
def
levelsMap
(
self
)
:
proc_args
=
"
%
s --list
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"chkconfig_prog_path"
),
self
.
systemServiceName
()
)
proc_args
=
"
%
s --list
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"chkconfig_prog_path"
),
self
.
__system_service_name
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
if
proc_returncode
!=
0
:
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
service_record_list
=
re
.
split
(
r"\s+"
,
proc_stdout
.
split
(
"
\n
"
)[
0
])
service_record_list
=
re
.
split
(
r"\s+"
,
proc_stdout
.
split
(
"
\n
"
)[
0
])
levels_list
=
[
"0"
]
*
(
len
(
service_record_list
)
-
1
)
levels_list
=
[
"0"
]
*
(
len
(
service_record_list
)
-
1
)
for
count
in
xrange
(
1
,
len
(
service_record_list
))
:
for
count
in
xrange
(
1
,
len
(
service_record_list
))
:
...
@@ -77,41 +73,30 @@ class SystemService(service.FunctionObject) :
...
@@ -77,41 +73,30 @@ class SystemService(service.FunctionObject) :
@service.functionMethod
(
SYSTEM_SERVICE_METHODS_NAMESPACE
,
out_signature
=
"i"
)
@service.functionMethod
(
SYSTEM_SERVICE_METHODS_NAMESPACE
,
out_signature
=
"i"
)
def
start
(
self
)
:
def
start
(
self
)
:
logger
.
verbose
(
"{mod}: Request to start service
\"
%
s
\"
"
%
(
self
.
systemServiceName
()
))
logger
.
verbose
(
"{mod}: Request to start service
\"
%
s
\"
"
%
(
self
.
__system_service_name
))
return
tools
.
execProcess
(
"
%
s start"
%
(
os
.
path
.
join
(
config
.
value
(
SERVICE_NAME
,
"initd_dir_path"
),
self
.
systemServiceName
()
)))[
2
]
return
tools
.
execProcess
(
"
%
s start"
%
(
os
.
path
.
join
(
config
.
value
(
SERVICE_NAME
,
"initd_dir_path"
),
self
.
__system_service_name
)))[
2
]
@service.functionMethod
(
SYSTEM_SERVICE_METHODS_NAMESPACE
,
out_signature
=
"i"
)
@service.functionMethod
(
SYSTEM_SERVICE_METHODS_NAMESPACE
,
out_signature
=
"i"
)
def
stop
(
self
)
:
def
stop
(
self
)
:
logger
.
verbose
(
"{mod}: Request to stop service
\"
%
s
\"
"
%
(
self
.
systemServiceName
()
))
logger
.
verbose
(
"{mod}: Request to stop service
\"
%
s
\"
"
%
(
self
.
__system_service_name
))
return
tools
.
execProcess
(
"
%
s stop"
%
(
os
.
path
.
join
(
config
.
value
(
SERVICE_NAME
,
"initd_dir_path"
),
self
.
systemServiceName
()
)))[
2
]
return
tools
.
execProcess
(
"
%
s stop"
%
(
os
.
path
.
join
(
config
.
value
(
SERVICE_NAME
,
"initd_dir_path"
),
self
.
__system_service_name
)))[
2
]
@service.functionMethod
(
SYSTEM_SERVICE_METHODS_NAMESPACE
,
out_signature
=
"i"
)
@service.functionMethod
(
SYSTEM_SERVICE_METHODS_NAMESPACE
,
out_signature
=
"i"
)
def
status
(
self
)
:
def
status
(
self
)
:
return
tools
.
execProcess
(
"
%
s status"
%
(
os
.
path
.
join
(
config
.
value
(
SERVICE_NAME
,
"initd_dir_path"
),
self
.
systemServiceName
()
)))[
2
]
return
tools
.
execProcess
(
"
%
s status"
%
(
os
.
path
.
join
(
config
.
value
(
SERVICE_NAME
,
"initd_dir_path"
),
self
.
__system_service_name
)))[
2
]
### Private ###
### Private ###
def
systemServiceName
(
self
)
:
return
self
.
__system_service_name
###
def
setLevels
(
self
,
levels
,
enabled_flag
)
:
def
setLevels
(
self
,
levels
,
enabled_flag
)
:
levels
=
self
.
validLevels
(
levels
)
levels
=
self
.
validLevels
(
levels
)
logger
.
verbose
(
"Request to
%
s service
\"
%
s
\"
on runlevels
\"
%
s
\"
"
%
(
(
"enable"
if
enabled_flag
else
"disable"
),
logger
.
verbose
(
"Request to
%
s service
\"
%
s
\"
on runlevels
\"
%
s
\"
"
%
(
(
"enable"
if
enabled_flag
else
"disable"
),
self
.
systemServiceName
()
,
(
levels
if
levels
!=
None
else
"default"
)
))
self
.
__system_service_name
,
(
levels
if
levels
!=
None
else
"default"
)
))
proc_args
=
"
%
s
%
s
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"chkconfig_prog_path"
),
(
"--level
%
s"
%
(
levels
)
if
levels
!=
None
else
""
),
proc_args
=
"
%
s
%
s
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"chkconfig_prog_path"
),
(
"--level
%
s"
%
(
levels
)
if
levels
!=
None
else
""
),
self
.
systemServiceName
(),
(
"on"
if
enabled_flag
else
"off"
)
)
self
.
__system_service_name
,
(
"on"
if
enabled_flag
else
"off"
)
)
(
proc_stdout
,
proc_stderr
,
proc_returncode
)
=
tools
.
execProcess
(
proc_args
)
return
tools
.
execProcess
(
proc_args
,
False
)[
2
]
if
proc_returncode
!=
0
:
raise
tools
.
SubprocessFailure
(
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc_returncode
))
return
proc_returncode
###
###
...
...
settingsd/tools.py
View file @
4498bce4
...
@@ -12,12 +12,21 @@ class SubprocessFailure(Exception) :
...
@@ -12,12 +12,21 @@ class SubprocessFailure(Exception) :
##### Public methods #####
##### Public methods #####
def
execProcess
(
proc_args
)
:
def
execProcess
(
proc_args
,
fatal_flag
=
True
)
:
logger
.
debug
(
"{submod}: Executing child process
\"
%
s
\"
"
%
(
proc_args
))
logger
.
debug
(
"{submod}: Executing child process
\"
%
s
\"
"
%
(
proc_args
))
proc
=
subprocess
.
Popen
(
proc_args
,
shell
=
True
,
bufsize
=
1024
,
close_fds
=
True
,
proc
=
subprocess
.
Popen
(
proc_args
,
shell
=
True
,
bufsize
=
1024
,
close_fds
=
True
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
env
=
{
"LC_ALL"
:
"C"
})
env
=
{
"LC_ALL"
:
"C"
})
(
proc_stdout
,
proc_stderr
)
=
proc
.
communicate
()
(
proc_stdout
,
proc_stderr
)
=
proc
.
communicate
()
if
proc
.
returncode
!=
0
:
error_text
=
"Error while execute
\"
%
s
\"\n
Stdout:
%
s
\n
Stderr:
%
s
\n
Return code:
%
d"
%
(
proc_args
,
proc_stdout
.
strip
(),
proc_stderr
.
strip
(),
proc
.
returncode
)
if
fatal_flag
:
raise
SubprocessFailure
(
error_text
)
logger
.
error
(
"{submod}: "
+
error_text
)
logger
.
debug
(
"{submod}: Child process
\"
%
s
\"
finished, return_code=
%
d"
%
(
proc_args
,
proc
.
returncode
))
logger
.
debug
(
"{submod}: Child process
\"
%
s
\"
finished, return_code=
%
d"
%
(
proc_args
,
proc
.
returncode
))
return
(
proc_stdout
,
proc_stderr
,
proc
.
returncode
)
return
(
proc_stdout
,
proc_stderr
,
proc
.
returncode
)
...
...
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