use correct getContextAttr() method: from object, not class

This commit is contained in:
Helmut Merz 2012-02-26 10:19:05 +01:00
parent 180ab86be6
commit d5690fafa2

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2010 Helmut Merz helmutm@cy55.de
# Copyright (c) 2012 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -48,14 +48,13 @@ class Row(BaseRow):
attributeHandlers = {}
def getRawValue(self, attr):
return self.attributeHandlers.get(attr, Row.getContextAttr)(self, attr)
return self.attributeHandlers.get(attr, self.getContextAttr)(self, attr)
@staticmethod
def getContextAttr(obj, attr):
return getattr(obj.context, attr)
class ResultSet(object):
def __init__(self, context, data, rowFactory=Row,