Commit bf7528d5 authored by André Anjos's avatar André Anjos 💬
Browse files

[python3] string class comparison using six

parent 48933d8c
......@@ -24,6 +24,7 @@ setup(
install_requires=[
'setuptools',
'six', # py2/3 compatibility library
'bob', # base signal proc./machine learning library
'xbob.db.verification.utils>=0.1.4' # defines a set of utilities for face verification databases like this one.
],
......
......@@ -7,6 +7,7 @@ BANCA database in the most obvious ways.
"""
import os
import six
from bob.db import utils
from .models import *
from .driver import Interface
......@@ -31,7 +32,7 @@ class Database(xbob.db.verification.utils.SQLiteDatabase, xbob.db.verification.u
"""Replace 'dev' by 'g1' and 'eval' by 'g2' in a list of groups, and
returns the new list"""
if not l: return l
elif isinstance(l, str): return self.__group_replace_alias__((l,))
elif isinstance(l, six.string_types): return self.__group_replace_alias__((l,))
l2 = []
for val in l:
if(val == 'dev'): l2.append('g1')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment