[GRASS-dev] pygrass: ipdb dependency

Pietro peter.zamb at gmail.com
Sun Apr 19 06:26:57 PDT 2015


Hi Martin,

On Sun, Apr 19, 2015 at 10:22 AM, Martin Landa <landa.martin at 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


More information about the grass-dev mailing list