diff options
author | Richard Hughes <richard@hughsie.com> | 2008-06-25 11:00:25 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-06-25 11:00:25 -0400 |
commit | ca62a2cfa6c62599544b3cf086ca8982251d5c70 (patch) | |
tree | 88e3eac2a361a43c9405c3b4250ad3872255704d | |
parent | da9cc1b00a1e9b52d369bb430a5628a0c9a41fb7 (diff) |
Error out if package isn't found instead of listing all properties.
-rw-r--r-- | src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); |