Project

General

Profile

« Previous | Next » 

Revision 2215

sql.py: esc_value(): Fixed bug where db needed to be referenced through self

View differences:

lib/sql.py
250 250
                except StopIteration: return None
251 251
    
252 252
    def esc_value(self, value):
253
        module = util.root_module(db.db)
254
        if module == 'psycopg2': return db.db.cursor().mogrify('%s', [value])
253
        module = util.root_module(self.db)
254
        if module == 'psycopg2': return self.db.cursor().mogrify('%s', [value])
255 255
        elif module == 'MySQLdb':
256 256
            import _mysql
257 257
            return _mysql.escape_string(value)

Also available in: Unified diff