summaryrefslogtreecommitdiff
path: root/test/suite/helper.py
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-07-11 18:08:18 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-07-11 18:08:18 +0000
commit4b6038c4ef5384c1650bc55a63a3eb86c8eb82de (patch)
treedf3600e9d524cff8d80cab35b75d4569cc0eeac7 /test/suite/helper.py
parent4bb63aa8cc0d2a71ef9e67d70ea967d744f9e7a5 (diff)
downloadmongo-4b6038c4ef5384c1650bc55a63a3eb86c8eb82de.tar.gz
Fix simplePopulate string test, string.find returns -1 on error.
Diffstat (limited to 'test/suite/helper.py')
-rw-r--r--test/suite/helper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/suite/helper.py b/test/suite/helper.py
index da432718261..931cc5c84a3 100644
--- a/test/suite/helper.py
+++ b/test/suite/helper.py
@@ -73,12 +73,12 @@ def simplePopulate(self, uri, config, rows):
self.pr('simplePopulate: ' + uri + ' with ' + str(rows) + ' rows')
self.session.create(uri, config)
cursor = self.session.open_cursor(uri, None, None)
- if string.find(config, "key_format=i"):
+ if string.find(config, "key_format=i") != -1:
for i in range(0, rows):
cursor.set_key(i)
cursor.set_value(str(i) + ': abcdefghijklmnopqrstuvwxyz')
cursor.insert()
- elif string.find(config, "key_format=S"):
+ elif string.find(config, "key_format=S") != -1:
for i in range(0, rows):
cursor.set_key(str(i))
cursor.set_value(str(i) + ': abcdefghijklmnopqrstuvwxyz')