Commit 3586466d authored by Ralf Schmitt's avatar Ralf Schmitt

greentest.py: fix AttributeError in modulename function when using python 2.4/2.5.

parent b2dac472
......@@ -95,7 +95,10 @@ class TestCase(BaseTestCase):
@property
def modulename(self):
test_method = getattr(self, self.testname)
return test_method.__func__.func_code.co_filename
try:
return test_method.__func__.func_code.co_filename
except AttributeError:
return test_method.im_func.func_code.co_filename
@property
def fullname(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment