Mercurial > p > roundup > code
comparison roundup/backends/back_postgresql.py @ 3924:21d3d7eeea8c
assorted pyflakes fixes
I (re-)discovered pyflakes today and ran it over to roundup
code to see what it had to say. It reported a ton of "imported
module foo but you're not actually using it" warnings and a couple
of actual errors that this patch fixes.
The code was wrong but it was mostly stuff that never gets
executed...like hyperdb.Choice.
| author | Justus Pendleton <jpend@users.sourceforge.net> |
|---|---|
| date | Thu, 27 Sep 2007 06:12:57 +0000 |
| parents | 416606b09b27 |
| children | 97ae174f7a0e |
comparison
equal
deleted
inserted
replaced
| 3923:d02aad94af5a | 3924:21d3d7eeea8c |
|---|---|
| 1 #$Id: back_postgresql.py,v 1.41 2007-09-25 19:49:19 jpend Exp $ | 1 #$Id: back_postgresql.py,v 1.42 2007-09-27 06:12:57 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 |
| 106 return 1 | 106 return 1 |
| 107 except: | 107 except: |
| 108 return 0 | 108 return 0 |
| 109 | 109 |
| 110 class Sessions(sessions_rdbms.Sessions): | 110 class Sessions(sessions_rdbms.Sessions): |
| 111 def set(*args, **kwargs): | 111 def set(self, *args, **kwargs): |
| 112 try: | 112 try: |
| 113 sessions_rdbms.Sessions.set(*args, **kwargs) | 113 sessions_rdbms.Sessions.set(*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 \ |
