def _get_db_version(self):
dbname = self._cfg.get('<STR_LIT>', '<STR_LIT>')<EOL>self._execute("<STR_LIT>" % dbname)<EOL>comment = self._curs_pg.fetchone()<EOL>if comment is None:<EOL><INDENT>raise NipapDatabaseNoVersionError("<STR_LIT>" % dbname)<EOL><DEDENT>db_version = None<EOL>m = re.match('<STR_LIT>', comment[<NUM_LIT:0>])<EOL>if m:<EOL><INDENT>db_version = int(m.group(<NUM_LIT:1>))<EOL><DEDENT>else:<EOL><INDENT>raise NipapError("<STR_LIT>")<EOL><DEDENT>return db_version<EOL>
Get the schema version of the nipap psql db.