From 0a1caf1bfe6c6f1847e9f81da6c02142d8b0d60b Mon Sep 17 00:00:00 2001
From: Olegs NIKISINS <onikisins@italix03.idiap.ch>
Date: Tue, 13 Mar 2018 08:49:19 +0100
Subject: [PATCH] Addressed empty annotations returning None

---
 bob/pad/face/database/batl.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bob/pad/face/database/batl.py b/bob/pad/face/database/batl.py
index 98db4eec..eb32c909 100644
--- a/bob/pad/face/database/batl.py
+++ b/bob/pad/face/database/batl.py
@@ -283,6 +283,10 @@ class BatlPadDatabase(PadDatabase):
 
                 annotations = json.load(json_file)
 
+        if not annotations: # if dictionary is empty
+
+            return None
+
         return annotations
 
 
-- 
GitLab