diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2015-04-03 19:08:04 -0400 |
---|---|---|
committer | Keith Bostic <keith.bostic@mongodb.com> | 2015-04-03 19:08:04 -0400 |
commit | 169fe762eabd02427dde21c0dc4a8888823e88d4 (patch) | |
tree | f2d76f055065903bbec14149e953886b0d2c81f8 | |
parent | 8227a3342a1dedbf783e982715f783b7dec07a7d (diff) | |
parent | 149a66b6383e63050a0c5f6eef3d82262e2ba3ee (diff) | |
download | mongo-169fe762eabd02427dde21c0dc4a8888823e88d4.tar.gz |
Merge pull request #1847 from pgunn/master
Add shebang, make db dir if does not exist
-rwxr-xr-x | examples/python/ex_access.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/python/ex_access.py b/examples/python/ex_access.py index 7789f932d19..6283f5051b8 100755 --- a/examples/python/ex_access.py +++ b/examples/python/ex_access.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # Public Domain 2014-2015 MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # @@ -24,9 +25,13 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. +import os from wiredtiger import wiredtiger_open # Connect to the database and open a session +if not os.path.exists('WT_TEST'): + os.makedirs('WT_TEST') + conn = wiredtiger_open('WT_TEST', 'create') session = conn.open_session() |