From: Alexander Alekhin Date: Fri, 11 Nov 2016 14:45:12 +0000 (+0300) Subject: build: fix warning in python parser X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1431^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a88b94cc442e82d19e7dc24055a1712e7a2bcb5b;p=platform%2Fupstream%2Fopencv.git 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) --- diff --git a/modules/python/src2/hdr_parser.py b/modules/python/src2/hdr_parser.py index a5ecae0..da90d80 100755 --- a/modules/python/src2/hdr_parser.py +++ b/modules/python/src2/hdr_parser.py @@ -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:]