From a88b94cc442e82d19e7dc24055a1712e7a2bcb5b Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 11 Nov 2016 17:45:12 +0300 Subject: [PATCH] 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) --- modules/python/src2/hdr_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/src2/hdr_parser.py b/modules/python/src2/hdr_parser.py index a5ecae04c7..da90d80821 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:]