diff MoinMoin/action/AttachFile.py @ 1419:f7f415cc1332

replace most find() calls by in/index()
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 26 Aug 2006 14:58:24 +0200
parents 760002b5ffa3
children 8a89649ab5f0
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Thu Aug 24 22:55:30 2006 +0200
+++ b/MoinMoin/action/AttachFile.py	Sat Aug 26 14:58:24 2006 +0200
@@ -689,7 +689,7 @@
 
 def unzip_file(pagename, request):
     _ = request.getText
-    valid_pathname = lambda name: (name.find('/') == -1) and (name.find('\\') == -1)
+    valid_pathname = lambda name: ('/' not in name) and ('\\' not in name)
 
     filename, fpath = _access_file(pagename, request)
     if not filename: