From dd67ea0210808d41ea3a7b5f6ddf46b0d38266ac Mon Sep 17 00:00:00 2001 From: Alexander Mordvintsev Date: Tue, 13 May 2014 17:55:57 +0400 Subject: [PATCH] find -> rindex --- modules/python/src2/gen2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/src2/gen2.py b/modules/python/src2/gen2.py index df2609145e..3d1300847f 100755 --- a/modules/python/src2/gen2.py +++ b/modules/python/src2/gen2.py @@ -830,7 +830,7 @@ class PythonWrapperGenerator(object): # step 1: scan the headers and build more descriptive maps of classes, consts, functions for hdr in srcfiles: - self.code_include.write( '#include "{}"\n'.format(hdr[hdr.find('opencv2/'):]) ) + self.code_include.write( '#include "{}"\n'.format(hdr[hdr.rindex('opencv2/'):]) ) decls = parser.parse(hdr) for decl in decls: name = decl[0]