Fixing error on deployment without nodes

 * Exception handling in handlers/base.py
 * Added test for that error

 Closes-bug: #1304991

Change-Id: Idb9652dea46f5bdb054c378f687f5cfc359da02e
Merge "Fixing error on deployment without nodes"