diff --git a/python/grass/pygrass/vector/table.py b/python/grass/pygrass/vector/table.py index 84f8b0244d9..637ee8b74f5 100644 --- a/python/grass/pygrass/vector/table.py +++ b/python/grass/pygrass/vector/table.py @@ -856,9 +856,11 @@ def connection(self): psycopg2.paramstyle = "qmark" db = " ".join(self.database.split(",")) return psycopg2.connect(db) - except ImportError: - er = "You need to install psycopg2 to connect with this table." - raise ImportError(er) + except ImportError as error: + error.add_note( + "You need to install psycopg2 to connect with this table." + ) + raise str_err = "Driver is not supported yet, pleas use: sqlite or pg" raise TypeError(str_err)