Changeset 06a310 in indico for indico/MaKaC/common/db.py


Ignore:
Timestamp:
10/18/10 11:31:09 (3 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
9977a3
Parents:
b605d4
Message:

[FIX] isConnected bug

  • Error reports couldn't be sent because of it;
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/common/db.py

    rc459bd3 r06a310  
    138138 
    139139    def getDBConnection( self ): 
    140         conn = self._getConnObject() 
    141         if conn == None: 
    142             raise Exception( _("request not started")) 
    143         return conn 
     140        return self._getConnObject() 
    144141 
    145142    def isConnected( self ): 
    146         if self._getConnObject() == None: 
    147             return False 
    148         else: 
    149             return True 
     143        tid = DBMgr._getUniqueIdentifier() 
     144 
     145        return tid in self._conn 
    150146 
    151147    def getDBConnCache(self): 
    152148        conn = self._getConnObject() 
    153         if conn == None: 
    154             raise Exception( _("request not started")) 
    155149        return conn._cache 
    156150 
Note: See TracChangeset for help on using the changeset viewer.