summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-06-25 11:00:25 -0400
committerKristian Høgsberg <krh@redhat.com>2008-06-25 11:00:25 -0400
commitca62a2cfa6c62599544b3cf086ca8982251d5c70 (patch)
tree88e3eac2a361a43c9405c3b4250ad3872255704d /src
parentda9cc1b00a1e9b52d369bb430a5628a0c9a41fb7 (diff)
Error out if package isn't found instead of listing all properties.
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 4db4289..615de8c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -85,9 +85,13 @@ list_properties(const char *package_name, uint32_t type)
uint32_t flags;
set = razor_set_open(repo_filename);
- if (package_name)
+ if (package_name) {
package = razor_set_get_package(set, package_name);
- else
+ if (!package) {
+ fprintf(stderr, "no package named \"%s\"\n", package_name);
+ return 1;
+ }
+ } else
package = NULL;
pi = razor_property_iterator_create(set, package);