diff --git a/test.py b/test.py index a0f38e3..dd5b859 100755 --- a/test.py +++ b/test.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import psycopg2 import traceback import random import string @@ -57,6 +58,11 @@ def test_list_of_dict(keys, list): ok = True for item in list: try: item.get(key, []) + except psycopg2.OperationalError as error: + print ERREUR + if show_traceback: print traceback.format_exc() + else: print "\t%r" % error + return except Exception as error: if ok: print ERREUR if show_traceback: print traceback.format_exc()