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
Labels
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
43bc7fd2
Commit
43bc7fd2
authored
Sep 09, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapformat: Don't check root if we don't want to.
parent
7eef339f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
slapos/cli/format.py
slapos/cli/format.py
+6
-2
No files found.
slapos/cli/format.py
View file @
43bc7fd2
...
@@ -6,7 +6,7 @@ import sys
...
@@ -6,7 +6,7 @@ import sys
from
slapos.cli.command
import
must_be_root
from
slapos.cli.command
import
must_be_root
from
slapos.cli.config
import
ConfigCommand
from
slapos.cli.config
import
ConfigCommand
from
slapos.format
import
do_format
,
FormatConfig
,
tracing_monkeypatch
,
UsageError
from
slapos.format
import
do_format
,
FormatConfig
,
tracing_monkeypatch
,
UsageError
from
slapos.util
import
string_to_boolean
class
FormatCommand
(
ConfigCommand
):
class
FormatCommand
(
ConfigCommand
):
"""
"""
...
@@ -61,7 +61,6 @@ class FormatCommand(ConfigCommand):
...
@@ -61,7 +61,6 @@ class FormatCommand(ConfigCommand):
help
=
"Console output (obsolete)"
)
help
=
"Console output (obsolete)"
)
return
ap
return
ap
@
must_be_root
def
take_action
(
self
,
args
):
def
take_action
(
self
,
args
):
configp
=
self
.
fetch_config
(
args
)
configp
=
self
.
fetch_config
(
args
)
...
@@ -69,6 +68,11 @@ class FormatCommand(ConfigCommand):
...
@@ -69,6 +68,11 @@ class FormatCommand(ConfigCommand):
conf
.
mergeConfig
(
args
,
configp
)
conf
.
mergeConfig
(
args
,
configp
)
# Parse if we have to check if running from root
# XXX document this feature.
if
string_to_boolean
(
getattr
(
conf
,
'root_check'
,
'True'
).
lower
()):
must_be_root
(
lambda
:
None
)
if
not
self
.
app
.
options
.
log_file
and
conf
.
log_file
:
if
not
self
.
app
.
options
.
log_file
and
conf
.
log_file
:
# no log file is provided by argparser,
# no log file is provided by argparser,
# we set up the one from config
# we set up the one from config
...
...
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