mongodb-labs / edda

A log visualizer for MongoDB - This Repository is NOT a supported MongoDB product
232 stars 28 forks source link

If it can't connect to mongod, exit gracefully #26

Closed kchodorow closed 12 years ago

kchodorow commented 12 years ago

Not very friendly at the moment:

$ python logl.py testLogs/1.log 
4fe47fb21d41c87a00000000
Traceback (most recent call last):
  File "logl.py", line 217, in <module>
    main()
  File "logl.py", line 82, in main
    connection = Connection(uri)
  File "/usr/local/lib/python2.7/dist-packages/pymongo-1.11-py2.7-linux-x86_64.egg/pymongo/connection.py", line 370, in __init__
    self.__find_master()
  File "/usr/local/lib/python2.7/dist-packages/pymongo-1.11-py2.7-linux-x86_64.egg/pymongo/connection.py", line 605, in __find_master
    raise AutoReconnect("could not find master/primary")
pymongo.errors.AutoReconnect: could not find master/primary
samantharitter commented 12 years ago

Should exit with a concise error message