diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-05-14 23:37:29 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-05-14 23:37:29 -0400 |
commit | bb4dc1d191787eab0ec63267742a7d5badb54902 (patch) | |
tree | 8900209f176628d54e1ab197b53f93035f3b2e5a /buildscripts/utils.py | |
parent | d86eb9590885aa43e9153b677da3bb9b3dbc87ae (diff) | |
download | mongo-bb4dc1d191787eab0ec63267742a7d5badb54902.tar.gz |
try to fix build
Diffstat (limited to 'buildscripts/utils.py')
-rw-r--r-- | buildscripts/utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/buildscripts/utils.py b/buildscripts/utils.py index 4157e76b5a4..48a5c76fefd 100644 --- a/buildscripts/utils.py +++ b/buildscripts/utils.py @@ -51,3 +51,15 @@ def ensureDir( name ): os.makedirs( d ) if not os.path.exists( d ): raise "Failed to create dir: " + name + +def didMongodStart( port=27017 , timeout=20 ): + while timeout > 0: + time.sleep( 1 ) + try: + checkMongoPort( port ) + return True + except Exception,e: + print( e ) + timeout = timeout - 1 + return False + |