Mercurial > ~astiob > upreckon > hgweb
diff upreckon/config.py @ 203:dd1f715398f0
Fixed mapping (dict) values of taskweight
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Wed, 17 Aug 2011 01:32:27 +0300 |
parents | 32650f4a2177 |
children | 166a23999bf7 |
line wrap: on
line diff
--- a/upreckon/config.py Wed Aug 17 01:07:02 2011 +0300 +++ b/upreckon/config.py Wed Aug 17 01:32:27 2011 +0300 @@ -177,10 +177,11 @@ elif not callable(module.tester): tester = tuple(module.tester) module.tester = (nativize_path(tester[0]),) + tester[1:] - try: - module.taskweight = dict(zip(module.problems, module.taskweight)) - except TypeError: - pass + if not isinstance(module.taskweight, dict): + try: + module.taskweight = dict(zip(module.problems, module.taskweight)) + except TypeError: + pass try: module.taskweight = module.taskweight[problem_name] except KeyError: