On Wed, Oct 19, 2011 at 9:49 AM, M.-A. Lemburg <m...@egenix.com> wrote: > Thinking about this some more ... > > Perhaps what you're really after is the following and I was just > misunderstanding the original proposal: > > class Connection: > > closed = False > > def close(self): > if self.closed: > return > # close the connection > ... > self.closed = True > > In other words, you don't silence any errors, but instead use > a flag to store the successful close operation and then simply > ignore all future calls to the method without raising an > exception.
Yep, the idea is just this :) Seems a reasonable behaviour but it currently raises an exception in the DBAPI unit test, which I feel a little bit on the strict side. -- Daniele _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig