[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] [PATCH] Improve PostGIS connection error reporting

From: David MENTRE
Subject: Re: [Maposmatic-dev] [PATCH] Improve PostGIS connection error reporting
Date: Thu, 7 Jan 2010 14:04:44 +0100

2010/1/7 Maxime Petazzoni <address@hidden>:
> * Maxime Petazzoni <address@hidden> [2010-01-07 13:19:25]:
>> -    except psycopg2.OperationalError:
>> +    except psycopg2.OperationalError, e:
>> +        www.settings.LOG.warning("Could not connect to the PostGIS 
>> database: %s" %
>> +                                 str(e)[:-1])
> Does this look better? I checked, it's correctly outputted into the
> maposmatic.log file when the error happens.

It looks much better. I think in other part of the code we do the
import so only LOG.warning() is needed but this is really a detail.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]