If the database doesn't exist it throws a python exception, this should throw something a little more useful.