Commits

Anonymous committed de4375b

enh: Give better err msg on db connection problems, bump ver.

Comments (0)

Files changed (1)

     from utk import *
 
     appname     = 'dumbo'
-    __version__ = '0.60a'
+    __version__ = '0.61a'
     title       = ' %s %s ' % (appname.title(), __version__)
     inipath     = ('dumbo.ini', '~/.config/dumbo.ini', '/etc/dumbo.ini')
     debug       = False
         try:
             self.db = DbConnector(self.config['dbtype']['module'])
         except (TypeError, IndexError, RuntimeError, KeyError), e:
-            log.warning('Unable to connect to database using config.')
+            log.error('%s: %s' % (e.__class__.__name__, e))
+            log.warn('Unable to connect to database using config, falling ' +
+                'back to demo mode.')
             self.db = None
         db_objs = self.populate_sidebar()
         self.sidebar = SideTree(TreeWalker(BranchNode(db_objs)), self.statxt)