comparison upreckon/config.py @ 175:35d59ba0e27c

Fixed crashing on callable values of the tester conf. var.
author Oleg Oshmyan <chortos@inbox.lv>
date Sat, 18 Jun 2011 02:54:05 +0100
parents e0b2fbd7ebe0
children a76cdc26ba9d
comparison
equal deleted inserted replaced
174:e0b2fbd7ebe0 175:35d59ba0e27c
171 else: 171 else:
172 module.path = problem_name 172 module.path = problem_name
173 if module.tester: 173 if module.tester:
174 if isinstance(module.tester, basestring): 174 if isinstance(module.tester, basestring):
175 module.tester = nativize_path(module.tester) 175 module.tester = nativize_path(module.tester)
176 else: 176 elif not callable(module.tester):
177 tester = tuple(module.tester) 177 tester = tuple(module.tester)
178 module.tester = (nativize_path(tester[0]),) + tester[1:] 178 module.tester = (nativize_path(tester[0]),) + tester[1:]
179 for name in 'pointmap', 'groupweight': 179 for name in 'pointmap', 'groupweight':
180 oldmap = getattr(module, name) 180 oldmap = getattr(module, name)
181 if isinstance(oldmap, dict): 181 if isinstance(oldmap, dict):