Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
b270f128
Commit
b270f128
authored
Jan 24, 2013
by
Sofia Papagiannaki
Browse files
Handle project-show invalid input
Raise CommandError there is no such project
parent
e9148c56
Changes
1
Show whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/im/management/commands/project-show.py
View file @
b270f128
...
...
@@ -61,9 +61,17 @@ class Command(BaseCommand):
if
is_id
:
name_or_id
=
int
(
name_or_id
)
infolist
=
(
app_info
(
name_or_id
,
is_id
)
if
options
[
'app'
]
search_application
=
True
if
options
[
'app'
]
else
False
infolist
=
(
app_info
(
name_or_id
,
is_id
)
if
search_application
else
project_info
(
name_or_id
,
is_id
))
if
not
infolist
:
kind
=
'project application'
if
search_application
else
'project'
field
=
'id'
if
is_id
or
'name'
msg
=
"Unknown %s with %s '%s'"
%
(
kind
,
field
,
name_or_id
)
raise
CommandError
(
msg
)
for
info
in
infolist
:
self
.
show_info
(
info
)
...
...
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