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
Paul Graydon
slapos.core
Commits
845e7fb6
Commit
845e7fb6
authored
Jun 26, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli: better message for 'command not found'
parent
ae837389
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
slapos/cli/entry.py
slapos/cli/entry.py
+9
-4
No files found.
slapos/cli/entry.py
View file @
845e7fb6
...
@@ -29,7 +29,8 @@ class SlapOSCommandManager(cliff.commandmanager.CommandManager):
...
@@ -29,7 +29,8 @@ class SlapOSCommandManager(cliff.commandmanager.CommandManager):
name
=
''
name
=
''
while
search_args
:
while
search_args
:
if
search_args
[
0
].
startswith
(
'-'
):
if
search_args
[
0
].
startswith
(
'-'
):
raise
ValueError
(
'Invalid command %r'
%
search_args
[
0
])
LOG
.
critical
(
'slapos: invalid option %r'
%
search_args
[
0
])
sys
.
exit
(
5
)
next_val
=
search_args
.
pop
(
0
)
next_val
=
search_args
.
pop
(
0
)
name
=
'%s %s'
%
(
name
,
next_val
)
if
name
else
next_val
name
=
'%s %s'
%
(
name
,
next_val
)
if
name
else
next_val
if
name
in
self
.
commands
:
if
name
in
self
.
commands
:
...
@@ -37,9 +38,13 @@ class SlapOSCommandManager(cliff.commandmanager.CommandManager):
...
@@ -37,9 +38,13 @@ class SlapOSCommandManager(cliff.commandmanager.CommandManager):
cmd_factory
=
cmd_ep
.
load
()
cmd_factory
=
cmd_ep
.
load
()
return
(
cmd_factory
,
name
,
search_args
)
return
(
cmd_factory
,
name
,
search_args
)
else
:
else
:
print
>>
sys
.
stderr
,
(
'The command %r does not exist or is not yet implemented.
\
n
'
LOG
.
critical
(
'slapos: the command %r does not exist or is not yet implemented.
\
n
'
'Please have a look at http://community.slapos.org to read documentation or forum.
\
n
'
'
\
n
'
'Please also make sure that SlapOS Node is up to date.'
%
(
argv
,))
'Available commands: %s
\
n
\
n
'
'Please find documentation and forum at http://community.slapos.org
\
n
'
'Please also make sure that the SlapOS Node package is up to date.'
,
' '
.
join
(
argv
),
', '
.
join
(
sorted
(
repr
(
c
)
for
c
in
self
.
commands
)))
sys
.
exit
(
5
)
sys
.
exit
(
5
)
...
...
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