From d338254bb7ee260e2be96d2345547c59adfa83ad Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 17 Jun 2013 16:26:00 +0200 Subject: [PATCH] Display meaningful message for queries w/o project Like: osc rq list -U $USER -t change_devel --- osc/commandline.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 8552e4b1..d6863da4 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -2027,11 +2027,14 @@ Please submit there instead, or use --nodevelproject to force direct submission. # Check if project actually exists if result list is empty if not results: - try: - show_project_meta(apiurl, project) - print('No results for {0}'.format(project)) - except TypeError: - print('Project {0} does not exist'.format(project)) + if project: + try: + show_project_meta(apiurl, project) + print('No results for {0}'.format(project)) + except TypeError: + print('Project {0} does not exist'.format(project)) + else: + print('No results') return results.sort(reverse=True)