Fix exception for _get_db_version

An exception should now be correctly thrown if there is no comment in
the database.
Merge pull request #588 from dosomder/586-fix-exception-db-version

Fix exception for _get_db_version