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
6569950a
Commit
6569950a
authored
May 06, 2019
by
Nick Yefremov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added exception handler to common_info
parent
879cc3bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
fmod_common_info.py
plugins/functions/fmod_common_info.py
+10
-2
No files found.
plugins/functions/fmod_common_info.py
View file @
6569950a
...
...
@@ -3,6 +3,7 @@
from
settingsd
import
config
from
settingsd
import
service
from
settingsd
import
logger
from
settingsd
import
shared
import
settingsd.tools
as
tools
...
...
@@ -93,12 +94,19 @@ class CommonInfo(service.FunctionObject) :
### Private ###
def
lsbOption
(
self
,
option
)
:
proc_args_list
=
[
config
.
value
(
SERVICE_NAME
,
"lsb_release_bin"
),
option
]
return
":"
.
join
(
tools
.
process
.
execProcess
(
proc_args_list
)[
0
]
.
split
(
":"
)[
1
:])
.
strip
()
def
unameOption
(
self
,
option
)
:
proc_args_list
=
[
config
.
value
(
SERVICE_NAME
,
"uname_bin"
),
option
]
return
tools
.
process
.
execProcess
(
proc_args_list
)[
0
]
.
strip
()
try
:
proc_args_list
=
[
config
.
value
(
SERVICE_NAME
,
"uname_bin"
),
option
]
return
tools
.
process
.
execProcess
(
proc_args_list
)[
0
]
.
strip
()
except
FileNotFoundError
:
logger
.
error
(
"Directory /usr/bin/lsb_release does not exist"
)
return
"Error: /usr/bin/lsb_release doesn
\'
t exist"
##### Public classes #####
...
...
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