build.py: Fix traceback when there are no dependencies

A recipe with no dependencies results in a traceback (e.g. all in
ASSUME_PROVIDED). This shouldn't happen and this patch fixes it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>