equal
deleted
inserted
replaced
246 if (request.exception is not None and not isinstance( |
246 if (request.exception is not None and not isinstance( |
247 request.exception, ( |
247 request.exception, ( |
248 httpexceptions.HTTPSuccessful, |
248 httpexceptions.HTTPSuccessful, |
249 httpexceptions.HTTPRedirection))): |
249 httpexceptions.HTTPRedirection))): |
250 cnx.rollback() |
250 cnx.rollback() |
|
251 elif cnx._cnx.commit_state == 'uncommitable': |
|
252 cnx.rollback() |
251 else: |
253 else: |
252 cnx.commit() |
254 cnx.commit() |
253 cnx.__exit__(None, None, None) |
255 cnx.__exit__(None, None, None) |
254 |
256 |
255 request.add_finished_callback(cleanup) |
257 request.add_finished_callback(cleanup) |