From 4877170d947aedb4c5b9098b92d4dcc8ebb8d133 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Thu, 9 Apr 2020 15:10:12 +0200
Subject: [PATCH] Fix using of bob.extension.rc

---
 bob/ip/binseg/data/drive/__init__.py | 1 -
 bob/ip/binseg/data/utils.py          | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/bob/ip/binseg/data/drive/__init__.py b/bob/ip/binseg/data/drive/__init__.py
index 58d101ad..2e6e8aef 100644
--- a/bob/ip/binseg/data/drive/__init__.py
+++ b/bob/ip/binseg/data/drive/__init__.py
@@ -9,7 +9,6 @@ import bob.extension
 from ..jsondataset import JSONDataset
 from ..loader import load_pil_rgb, load_pil_1
 
-
 _protocols = [
         pkg_resources.resource_filename(__name__, "default.json"),
         pkg_resources.resource_filename(__name__, "second-annotation.json"),
diff --git a/bob/ip/binseg/data/utils.py b/bob/ip/binseg/data/utils.py
index 50db3da3..ecb90bca 100644
--- a/bob/ip/binseg/data/utils.py
+++ b/bob/ip/binseg/data/utils.py
@@ -19,10 +19,9 @@ def rc_variable_set(name):
     def wrapped_function(test):
         @functools.wraps(test)
         def wrapper(*args, **kwargs):
-            if bob.extension.rc[name]:
-                return test(*args, **kwargs)
-            else:
+            if name not in bob.extension.rc:
                 raise nose.plugins.skip.SkipTest("Bob's RC variable '%s' is not set" % name)
+            return test(*args, **kwargs)
 
         return wrapper
 
-- 
GitLab