GRASS GIS logo

Source code for pygrass.errors

# -*- coding: utf-8 -*-
from functools import wraps

from grass.exceptions import (FlagError, ParameterError, DBError,
                              GrassError, OpenError)

from grass.pygrass.messages import get_msgr


[docs]def must_be_open(method): @wraps(method) def wrapper(self, *args, **kargs): if self.is_open(): return method(self, *args, **kargs) else: get_msgr().warning(_("The map is close!")) return wrapper

Help Index | Topics Index | Keywords Index | Full Index

© 2003-2018 GRASS Development Team, GRASS GIS 7.0.7svn Reference Manual