From: David Wells Date: Fri, 10 Jul 2015 00:53:26 +0000 (-0400) Subject: Remove a deprecated function usage. X-Git-Tag: v8.3.0-rc1~40^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14dd52d56c6ea4d1afb4a7d9cdca1afdb2afa89a;p=dealii.git Remove a deprecated function usage. This function (string.find) was deprecated in python 2.4 in favor of the .find() method of strings and was and removed in python 3. --- diff --git a/contrib/utilities/wrapcomments.py b/contrib/utilities/wrapcomments.py index 3c18d38a22..30a870e511 100755 --- a/contrib/utilities/wrapcomments.py +++ b/contrib/utilities/wrapcomments.py @@ -9,7 +9,6 @@ from __future__ import print_function import textwrap import sys -import string wrapper = textwrap.TextWrapper() # take an array of lines and wrap them to 78 columns and let each line start @@ -73,19 +72,19 @@ def format_block(lines, infostr=""): if lines[0].strip()!="/**": #print ("%s warning code block not starting in separate line"%infostr, file=sys.stderr) - idx = string.find(lines[0],"/**") + idx = lines[0].find("/**") temp = [lines[0][0:idx+3], lines[0][idx+3:]] temp.extend(lines[1:]) lines = temp if lines[-1].strip()!="*/": #print ("%s warning code block not ending in separate line"%infostr, file=sys.stderr) - idx = string.find(lines[-1],"*/") + idx = lines[-1].find("*/") temp = lines[0:-1] temp.append(lines[-1][0:idx]) temp.append(lines[-1][idx:]) lines = temp - idx = string.find(lines[0],"/**") + idx = lines[0].find("/**") start = lines[0][:idx]+" * " out = [lines[0].rstrip()]