Fix for VPD test failure

Change-Id: I6c1b7a668a82f992563b82afd0526ff490ad1ec2
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/lib/vpd_utils.py b/lib/vpd_utils.py
index 8a7f583..38a86d7 100644
--- a/lib/vpd_utils.py
+++ b/lib/vpd_utils.py
@@ -45,7 +45,10 @@
     bsu_options = fa.args_to_objects(bsu_options)
     out_buf, stderr, rc = bsu.bmc_execute_command('vpd-tool ' + option_string, **bsu_options)
 
-    # Only return output if its a VPD read command.
-    if '-r' in option_string:
+    # Only return output if its not a VPD write command.
+    if '-w' not in option_string:
         out_buf = json.loads(out_buf)
-        return out_buf
+        if '-r' in option_string:
+            return out_buf
+        else:
+            return out_buf[0]