Ticket #1121: patch.py

File patch.py, 538 bytes (added by hipertracker@…, 19 years ago)

correctly formated code

Line 
1 def cursor(self):
2 # ...
3 #
4 # OLD code:
5 # if DEBUG:
6 # return base.CursorDebugWrapper(MysqlDebugWrapper(self.connection.cursor()), self)
7 #return self.connection.cursor()
8
9 # NEW code:
10 if self.connection.get_server_info() >= '4.1':
11 cursor = self.connection.cursor()
12 cursor.execute("SET NAMES utf8")
13 if DEBUG:
14 return base.CursorDebugWrapper(MysqlDebugWrapper(cursor), self)
15 return cursor
Back to Top