[Twisted-web] pgasync INTERVAL

Andrea Arcangeli andrea at cpushare.com
Fri Dec 16 07:47:34 MST 2005


On Fri, Dec 16, 2005 at 02:19:08PM +0100, Andrea Arcangeli wrote:
> 2005/12/16 14:18 CET [PgProtocol,client] [Failure instance: Traceback
> (failure with no frames): pgasync.errors.DatabaseError: 34000: cursor
> "none" does not exist
> 2005/12/16 14:18 CET [PgProtocol,client] ]
> 
> I didn't extract any meaningful stack trace yet.

here an incremental fix for the above problem:


Index: pgasync/pgasync/format.py
===================================================================
--- pgasync/pgasync/format.py	(revision 86)
+++ pgasync/pgasync/format.py	(working copy)
@@ -7,10 +7,6 @@
 from errors import *
 from registry import *
 
-from decimal import Decimal
-# Types that are already suitable for str() representation
-donetypes  = [STRING,UNICODE,BINARY,NUMBER,ROWID,DATETIME,BOOL,MONEY,int,float,Decimal]
-
 def typeCastParam(p):
 	"""Cast p to the appropriate type if possible.
 	"""
@@ -36,7 +32,7 @@
 	binary sequences, etc
 	"""
 
-	s = s.strip()
+	s = s.strip().replace('\n', ' ')
 	if s[-1] == ";":
 		s = s[:-1]
 

Please apply both patches to trunk thanks!



More information about the Twisted-web mailing list