build: fix warning in python parser

/usr/lib/python3.5/re.py:203: FutureWarning: split() requires a non-empty pattern match.
  return _compile(pattern, flags).split(string, maxsplit)
This commit is contained in:
Alexander Alekhin 2016-11-11 17:45:12 +03:00
parent bdf661538d
commit a88b94cc44

View File

@ -250,7 +250,7 @@ class CppHeaderParser(object):
l = l[:npos] + l[npos3+1:]
l = self.batch_replace(l, [("CV_EXPORTS_W", ""), ("CV_EXPORTS", ""), ("public virtual ", " "), ("public ", " "), ("::", ".")]).strip()
ll = re.split(r'\s*[,:]?\s*', l)
ll = re.split(r'\s+|\s*[,:]\s*', l)
ll = [le for le in ll if le]
classname = ll[1]
bases = ll[2:]