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

Re: ITP: Name for "real" python-pgsql module



Paweł Tęcza pisze:

I don't know whether python-pypgsql and psycopg2 modules are compatible, because I don't have any experiences with them, but I can try it,
of course.

Unfortunately, it's not easy... It seems that Pythonfilter doesn't work with psycopg2 and now I can see the following error messages in maillog file:

Dec 18 11:33:54 xxx courierfilter: Uncaught exception in "greylist" doFilter function: <class 'psycopg2.ProgrammingError'>: current transaction is aborted, commands ignored unti
l end of transaction block
Dec 18 11:33:54 xxx courierfilter:
Dec 18 11:33:54 xxx courierfilter: File "/etc/courier/filters/active/pythonfilter", lin
e 199, in processMessage
Dec 18 11:33:54 xxx courierfilter: replyCode = i_filter[1](bodyFile, controlFileList) Dec 18 11:33:54 xxx courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/
greylist.py", line 105, in doFilter
Dec 18 11:33:54 xxx courierfilter: _sendersPassed.purge()
Dec 18 11:33:54 xxx courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/
TtlDb.py", line 138, in purge
Dec 18 11:33:54 xxx courierfilter: (minVal,))
Dec 18 11:33:54 xxx courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/
TtlDb.py", line 116, in _dbWrite
Dec 18 11:33:54 xxx courierfilter: c = self._dbExec(query, params)
Dec 18 11:33:54 xxx courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/
TtlDb.py", line 101, in _dbExec
Dec 18 11:33:54 xxx courierfilter: c = self._dbExec(query, params, reconnect=False) Dec 18 11:33:54 xxx courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/
TtlDb.py", line 96, in _dbExec
Dec 18 11:33:54 xxx courierfilter: c.execute(query, params)

So, I'm affraid that packaging of python-pypgsql module is necessary
in that situation. I'm not a Python programmer and don't want to change the sources.

Cheers,

P.


Reply to: