# HG changeset patch # User Sylvain Thénault # Date 1299603315 -3600 # Node ID c8f12ab250b727838932c1552dbe983186b79a8c # Parent 0673419b30661b5a5bca930196c0c7b25bb7682a Add a "closed" property on session This will simplify check and allow nicer error thatn the current "no _tx_data" attribute error. diff -r 0673419b3066 -r c8f12ab250b7 server/session.py --- a/server/session.py Tue Mar 08 17:55:02 2011 +0100 +++ b/server/session.py Tue Mar 08 17:55:15 2011 +0100 @@ -854,6 +854,10 @@ del self.__threaddata del self._tx_data + @property + def closed(self): + return not hasattr(self, '_tx_data') + # transaction data/operations management ################################## @property