Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
slapos.core
Commits
a91f939e
Commit
a91f939e
authored
Sep 09, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless chack in legacy code.
parent
43bc7fd2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
14 deletions
+1
-14
slapos/format.py
slapos/format.py
+1
-14
No files found.
slapos/format.py
View file @
a91f939e
...
...
@@ -54,6 +54,7 @@ import xml_marshaller.xml_marshaller
from
slapos.util
import
chownDirectory
from
slapos.util
import
mkdir_p
from
slapos.util
import
is_string_true
import
slapos.slap
as
slap
...
...
@@ -1203,20 +1204,6 @@ class FormatConfig(object):
if
self
.
alter_network
and
self
.
create_tap
:
self
.
checkRequiredBinary
([
'brctl'
])
# Check if root is needed
if
(
self
.
alter_network
or
self
.
alter_user
)
and
not
self
.
dry_run
:
root_needed
=
True
else
:
root_needed
=
False
# check root
# XXX in the new CLI, this is checked by the @must_be_root decorator.
if
sys
.
platform
!=
'cygwin'
and
root_needed
and
os
.
getuid
()
!=
0
:
message
=
"Root rights are needed"
self
.
logger
.
error
(
message
)
sys
.
stderr
.
write
(
message
+
'
\
n
'
)
sys
.
exit
()
# Check mandatory options
for
parameter
in
(
'computer_id'
,
'instance_root'
,
'master_url'
,
'software_root'
,
'computer_xml'
):
...
...
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