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
Gabriel Monnerat
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
from
slapos.cli.command
import
must_be_root
from
slapos.cli.config
import
ConfigCommand
from
slapos.format
import
do_format
,
FormatConfig
,
tracing_monkeypatch
,
UsageError
from
slapos.util
import
string_to_boolean
class
FormatCommand
(
ConfigCommand
):
"""
...
...
@@ -61,7 +61,6 @@ class FormatCommand(ConfigCommand):
help
=
"Console output (obsolete)"
)
return
ap
@
must_be_root
def
take_action
(
self
,
args
):
configp
=
self
.
fetch_config
(
args
)
...
...
@@ -69,6 +68,11 @@ class FormatCommand(ConfigCommand):
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
:
# no log file is provided by argparser,
# 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