_get_tenant_by_name doesn't return correctly

If tempest_client is unset, _get_tenant_by_name will
definitely raise an exception, which is incorrect.

Change-Id: Id3e452a35d4f6c7083562689f556cac05868af45
Closes-Bug: #1231645
diff --git a/tempest/common/isolated_creds.py b/tempest/common/isolated_creds.py
index 2fc4eb9..eadb0c2 100644
--- a/tempest/common/isolated_creds.py
+++ b/tempest/common/isolated_creds.py
@@ -94,7 +94,9 @@
             for ten in tenants:
                 if ten['name'] == name:
                     tenant = ten
-            raise exceptions.NotFound('No such tenant')
+                    break
+            else:
+                raise exceptions.NotFound('No such tenant')
         return tenant
 
     def _create_user(self, username, password, tenant, email):