Mercurial > ~astiob > upreckon > hgweb
comparison upreckon/config.py @ 171:161d78f52cc3 2.01
Fixed crashing on callable values of the tester conf. var.
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Sat, 18 Jun 2011 01:57:35 +0100 |
parents | 43e1f2d5d5a4 |
children |
comparison
equal
deleted
inserted
replaced
168:8fa35d757cb0 | 171:161d78f52cc3 |
---|---|
170 else: | 170 else: |
171 module.path = problem_name | 171 module.path = problem_name |
172 if module.tester: | 172 if module.tester: |
173 if isinstance(module.tester, basestring): | 173 if isinstance(module.tester, basestring): |
174 module.tester = nativize_path(module.tester) | 174 module.tester = nativize_path(module.tester) |
175 else: | 175 elif not callable(module.tester): |
176 tester = tuple(module.tester) | 176 tester = tuple(module.tester) |
177 module.tester = (nativize_path(tester[0]),) + tester[1:] | 177 module.tester = (nativize_path(tester[0]),) + tester[1:] |
178 for name in 'pointmap', 'groupweight': | 178 for name in 'pointmap', 'groupweight': |
179 oldmap = getattr(module, name) | 179 oldmap = getattr(module, name) |
180 if isinstance(oldmap, dict): | 180 if isinstance(oldmap, dict): |