diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-04-21 21:58:00 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-04-21 21:58:00 -0400 |
commit | d8b762a2ea75f1e8af00fa47a3fb1cfb797c9bb4 (patch) | |
tree | 8c5b7dc99674113ff5415e16490b457a27e0697d /shell | |
parent | dc75bbf201ddbb2e503e4aa9033553807a19e80f (diff) | |
download | mongo-d8b762a2ea75f1e8af00fa47a3fb1cfb797c9bb4.tar.gz |
don't pring getLastError on help()
Diffstat (limited to 'shell')
-rw-r--r-- | shell/collection.js | 1 | ||||
-rw-r--r-- | shell/db.js | 2 | ||||
-rw-r--r-- | shell/utils.js | 4 |
3 files changed, 7 insertions, 0 deletions
diff --git a/shell/collection.js b/shell/collection.js index 918f5e5afc7..7395183c684 100644 --- a/shell/collection.js +++ b/shell/collection.js @@ -60,6 +60,7 @@ DBCollection.prototype.help = function() { print("\tdb."+shortName+".update(query, object[, upsert_bool, multi_bool])"); print("\tdb."+shortName+".validate() - SLOW"); print("\tdb."+shortName+".getShardVersion() - only for use with sharding"); + return __magicNoPrint; } DBCollection.prototype.getFullName = function(){ diff --git a/shell/db.js b/shell/db.js index 21c15293e39..7e4395b5a70 100644 --- a/shell/db.js +++ b/shell/db.js @@ -289,6 +289,8 @@ DB.prototype.help = function() { print("\tdb.stats()"); print("\tdb.version() current version of the server"); print("\tdb.getMongo().setSlaveOk() allow queries on a replication slave server"); + + return __magicNoPrint; } DB.prototype.printCollectionStats = function(){ diff --git a/shell/utils.js b/shell/utils.js index 027ba0d6386..a3c43cf1399 100644 --- a/shell/utils.js +++ b/shell/utils.js @@ -1,5 +1,6 @@ __quiet = false; +__magicNoPrint = { __magicNoPrint : 1111 } chatty = function(s){ if ( ! __quiet ) @@ -723,6 +724,9 @@ shellPrintHelper = function( x ){ return; } + if ( x == __magicNoPrint ) + return; + if ( x == null ){ print( "null" ); return; |