knotty: Move second event check into a proper block

so that it doesn't check it twice for non-empty events

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker: Get rid of duplicate 'import re'

The re module was imported at the top, no need to do it again.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>