Mercurial > ~astiob > upreckon > hgweb
comparison config.py @ 107:6589511f5418
Fixed mishandling of some variables in multi-problem legacy configurations
| author | Oleg Oshmyan <chortos@inbox.lv> |
|---|---|
| date | Fri, 08 Apr 2011 19:22:19 +0300 |
| parents | c3afa2b0c14c |
| children |
comparison
equal
deleted
inserted
replaced
| 106:aa0378ea1f93 | 107:6589511f5418 |
|---|---|
| 110 inputdatafname = f.name | 110 inputdatafname = f.name |
| 111 metafile.copy(inputdatafname) | 111 metafile.copy(inputdatafname) |
| 112 with ReadDeleting(inputdatafname) as f: | 112 with ReadDeleting(inputdatafname) as f: |
| 113 module = imp.load_module('testconf', f, metafile.full_real_path, ('.py', 'r', imp.PY_SOURCE)) | 113 module = imp.load_module('testconf', f, metafile.full_real_path, ('.py', 'r', imp.PY_SOURCE)) |
| 114 del sys.modules['testconf'] | 114 del sys.modules['testconf'] |
| 115 module = Config(module, globalconf) | |
| 115 if hasattr(module, 'padwithzeroestolength'): | 116 if hasattr(module, 'padwithzeroestolength'): |
| 116 if not hasattr(module, 'padtests'): | 117 if not hasattr(module, 'padtests'): |
| 117 try: | 118 try: |
| 118 module.padtests = module.padwithzeroestolength[0] | 119 module.padtests = module.padwithzeroestolength[0] |
| 119 except TypeError: | 120 except TypeError: |
| 126 if (not hasattr(module, 'maxcputime') and | 127 if (not hasattr(module, 'maxcputime') and |
| 127 not hasattr(module, 'maxwalltime') and | 128 not hasattr(module, 'maxwalltime') and |
| 128 hasattr(module, 'maxtime')): | 129 hasattr(module, 'maxtime')): |
| 129 module.maxcputime = module.maxtime | 130 module.maxcputime = module.maxtime |
| 130 for name in defaults_problem: | 131 for name in defaults_problem: |
| 131 if not hasattr(globalconf, name): | 132 setattr(module, name, getattr(module, name, defaults_problem[name])) |
| 132 setattr(module, name, getattr(module, name, defaults_problem[name])) | |
| 133 module = Config(module, globalconf) | |
| 134 if not module.dummyinname: | 133 if not module.dummyinname: |
| 135 module.dummyinname = getattr(module, 'testcaseinname', module.dummyinname) | 134 module.dummyinname = getattr(module, 'testcaseinname', module.dummyinname) |
| 136 if not module.dummyoutname: | 135 if not module.dummyoutname: |
| 137 module.dummyoutname = getattr(module, 'testcaseoutname', module.dummyoutname) | 136 module.dummyoutname = getattr(module, 'testcaseoutname', module.dummyoutname) |
| 138 if not hasattr(module, 'path'): | 137 if not hasattr(module, 'path'): |
