Skip to content

Commit 2332e6c

Browse files
committed
Python 3 preparation: avoid string.find.
1 parent 1a496da commit 2332e6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roundup/cgi/templating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _find(self, name):
171171
f = name + extension
172172
src = os.path.join(realsrc, f)
173173
realpath = os.path.realpath(src)
174-
if string.find(realpath, realsrc) != 0:
174+
if not realpath.startswith(realsrc):
175175
return # will raise invalid template
176176
if os.path.exists(src):
177177
return (src, f)

0 commit comments

Comments
 (0)