equal
deleted
inserted
replaced
1295 |
1295 |
1296 Connection is created if necessary""" |
1296 Connection is created if necessary""" |
1297 with self._lock: # no connection exist with the same id |
1297 with self._lock: # no connection exist with the same id |
1298 try: |
1298 try: |
1299 if self.closed: |
1299 if self.closed: |
1300 raise SessionClosedError('try to access connections set on a closed session %s' % self.id) |
1300 raise SessionClosedError('try to access connections set on' |
|
1301 ' a closed session %s' % self.id) |
1301 cnx = self._cnxs[cnxid] |
1302 cnx = self._cnxs[cnxid] |
1302 except KeyError: |
1303 except KeyError: |
1303 cnx = Connection(self, cnxid=cnxid) |
1304 cnx = Connection(self, cnxid=cnxid) |
1304 self._cnxs[cnxid] = cnx |
1305 self._cnxs[cnxid] = cnx |
1305 return cnx |
1306 return cnx |