Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
fwdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
65e5a910
authored
Jul 30, 2015
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
is_there_systemd() with with
parent
bdfbc9e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
utils.py
+6
-8
No files found.
utils.py
View file @
65e5a910
...
@@ -65,13 +65,11 @@ def ns_exec(args, stdin=None):
...
@@ -65,13 +65,11 @@ def ns_exec(args, stdin=None):
def
is_there_systemd
():
def
is_there_systemd
():
devnull
=
open
(
os
.
devnull
,
"w"
)
with
open
(
os
.
devnull
,
"w"
)
as
devnull
:
try
:
try
:
sp
.
call
([
"/bin/systemctl"
,
"--version"
],
stdout
=
devnull
,
stderr
=
devnull
)
sp
.
call
([
"/bin/systemctl"
,
"--version"
],
stdout
=
devnull
,
stderr
=
devnull
)
except
OSError
:
except
OSError
:
return
False
return
False
finally
:
devnull
.
close
()
return
True
return
True
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