[GRASS-dev] pygrass: ipdb dependency

Hi,

it's seems that pygrass depends on ipdb, see

lib/python/pygrass/vector/geometry.py: import ipdb; ipdb.set_trace()

on other places such line is commented out. Is such dependency really needed?

Thanks, Martin

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa

Hi Martin,

On Sun, Apr 19, 2015 at 10:22 AM, Martin Landa <landa.martin@gmail.com> wrote:

lib/python/pygrass/vector/geometry.py: import ipdb; ipdb.set_trace()

on other places such line is commented out. Is such dependency really needed?

no, it is just for debugging.
In particular the one that is present on geometry.py is acalled only
when an exception from the SQL is raised:

{{{
        try:
            cur = self.table.execute(sql.SELECT_WHERE.format(cols=key,
                                                         tname=self.table.name,
                                                         condition=self.cond))
        except:
            import ipdb; ipdb.set_trace()
}}}

Because I was trying to catch a bug, therefore the ipdb is imported
only if the sql execution fails, I can easily remove it.
I don't think it is a big issue.

Best regards

Pietro