Don't print the empty table on list operations.

Changes to strutils.safe_encode cause the empty
table to be printed out when no objects are actually
retrieved.

This patch just adds a check of the object list length
before calling strutils.safe_encode, if the length is NOT
> 0 we just return like we used to.

Change-Id: I57930b5210c975baa7c4510fcf82b17157e17788
Merge "Don't print the empty table on list operations."