Mercurial > p > roundup > code
comparison roundup/backends/back_postgresql.py @ 3927:97ae174f7a0e
add self to Sessions.set
Richard noticed my earlier change broke things. Third try's the
charm?
| author | Justus Pendleton <jpend@users.sourceforge.net> |
|---|---|
| date | Fri, 28 Sep 2007 15:15:06 +0000 |
| parents | 21d3d7eeea8c |
| children | 732a37da3a10 |
comparison
equal
deleted
inserted
replaced
| 3926:89a906238826 | 3927:97ae174f7a0e |
|---|---|
| 1 #$Id: back_postgresql.py,v 1.42 2007-09-27 06:12:57 jpend Exp $ | 1 #$Id: back_postgresql.py,v 1.43 2007-09-28 15:15:06 jpend Exp $ |
| 2 # | 2 # |
| 3 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt> | 3 # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <andrey@micro.lt> |
| 4 # | 4 # |
| 5 # This module is free software, and you may redistribute it and/or modify | 5 # This module is free software, and you may redistribute it and/or modify |
| 6 # under the same terms as Python, so long as this copyright message and | 6 # under the same terms as Python, so long as this copyright message and |
| 108 return 0 | 108 return 0 |
| 109 | 109 |
| 110 class Sessions(sessions_rdbms.Sessions): | 110 class Sessions(sessions_rdbms.Sessions): |
| 111 def set(self, *args, **kwargs): | 111 def set(self, *args, **kwargs): |
| 112 try: | 112 try: |
| 113 sessions_rdbms.Sessions.set(*args, **kwargs) | 113 sessions_rdbms.Sessions.set(self, *args, **kwargs) |
| 114 except ProgrammingError, err: | 114 except ProgrammingError, err: |
| 115 response = str(err).split('\n')[0] | 115 response = str(err).split('\n')[0] |
| 116 if -1 != response.find('ERROR') and \ | 116 if -1 != response.find('ERROR') and \ |
| 117 -1 != response.find('could not serialize access due to concurrent update'): | 117 -1 != response.find('could not serialize access due to concurrent update'): |
| 118 # another client just updated, and we're running on | 118 # another client just updated, and we're running on |
