Re: psycopg2: proper positioning of .commit() within try: except: blocks

Liste des GroupesRevenir à cl python 
Sujet : Re: psycopg2: proper positioning of .commit() within try: except: blocks
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.python
Date : 08. Sep 2024, 13:57:45
Autres entêtes
Organisation : Stefan Ram
Message-ID : <rollback-20240908125702@ram.dialup.fu-berlin.de>
References : 1 2 3 4 5 6 7 8 9 10
Jon Ribbens <jon+usenet@unequivocal.eu> wrote or quoted:
What if there's an exception in your exception handler? I'd put the
rollback in the 'finally' handler, so it's always called.

  To make this happen, you'd better kick off with the rollback right
  at the beginning of the "finally:" block. Otherwise, some gnarly
  exception might rear its ugly head before the rollback gets called!



Date Sujet#  Auteur
7 Sep 24 * Re: psycopg2: proper positioning of .commit() within try: except: blocks25Karsten Hilbert
8 Sep 24 `* Re: psycopg2: proper positioning of .commit() within try: except: blocks24Greg Ewing
8 Sep 24  +* Re: psycopg2: proper positioning of .commit() within try: except: blocks20Jon Ribbens
8 Sep 24  i+- Re: psycopg2: proper positioning of .commit() within try: except: blocks1Stefan Ram
8 Sep 24  i+* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)17Lawrence D'Oliveiro
9 Sep 24  ii`* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)16Jon Ribbens
9 Sep 24  ii `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)15Lawrence D'Oliveiro
9 Sep 24  ii  `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)14Jon Ribbens
9 Sep 24  ii   +- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Karsten Hilbert
9 Sep 24  ii   +* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)2Karsten Hilbert
9 Sep 24  ii   i`- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Jon Ribbens
9 Sep 24  ii   `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)10Lawrence D'Oliveiro
9 Sep 24  ii    `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)9Jon Ribbens
9 Sep 24  ii     `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)8Lawrence D'Oliveiro
10 Sep 24  ii      `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)7Jon Ribbens
10 Sep 24  ii       +* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)2Karsten Hilbert
10 Sep 24  ii       i`- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Jon Ribbens
10 Sep 24  ii       `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)4Lawrence D'Oliveiro
11 Sep 24  ii        `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)3Jon Ribbens
11 Sep 24  ii         `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)2Lawrence D'Oliveiro
11 Sep 24  ii          `- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Jon Ribbens
9 Sep 24  i`- Re: psycopg2: proper positioning of .commit() within try: except: blocks1Greg Ewing
8 Sep 24  +- Re: psycopg2: proper positioning of .commit() within try: except: blocks1Karsten Hilbert
8 Sep 24  +- Re: psycopg2: proper positioning of .commit() within try: except: blocks1Karsten Hilbert
13 Sep 24  `- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal