Instead of printing a message for a non-existent requested key, just
print an empty string.  This mimics the behavior of ovs-vsctl.

Signed-off-by: Justin Pettit <[email protected]>
---
 ovn/ovn-nbctl.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/ovn/ovn-nbctl.c b/ovn/ovn-nbctl.c
index 2078e2a..7021aa6 100644
--- a/ovn/ovn-nbctl.c
+++ b/ovn/ovn-nbctl.c
@@ -203,10 +203,8 @@ do_lswitch_get_external_id(struct ovs_cmdl_context *ctx)
         /* List one external ID */
 
         value = smap_get(&lswitch->external_ids, key);
-        if (value && *value) {
+        if (value) {
             printf("%s\n", value);
-        } else {
-            printf("external-id '%s' is not set.\n", key);
         }
     } else {
         struct smap_node *node;
@@ -361,10 +359,8 @@ do_lport_get_external_id(struct ovs_cmdl_context *ctx)
         /* List one external ID */
 
         value = smap_get(&lport->external_ids, key);
-        if (value && *value) {
+        if (value) {
             printf("%s\n", value);
-        } else {
-            printf("external-id '%s' is not set.\n", key);
         }
     } else {
         struct smap_node *node;
-- 
1.7.5.4

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to