comparison upreckon/config.py @ 207:946e8c09ba12

Fixed single-problem configurations (regression in 32650f4a2177)
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 18 Aug 2011 01:19:15 +0300
parents 166a23999bf7
children ede78fbd509a
comparison
equal deleted inserted replaced
206:4edb6ef5a676 207:946e8c09ba12
253 if not options.erase: 253 if not options.erase:
254 for name in defaults_noerase: 254 for name in defaults_noerase:
255 setattr(module, name, getattr(module, name, defaults_noerase[name])) 255 setattr(module, name, getattr(module, name, defaults_noerase[name]))
256 if hasattr(module, 'tasknames'): 256 if hasattr(module, 'tasknames'):
257 module.problems = module.tasknames 257 module.problems = module.tasknames
258 # Iterable and mapping taskweights cause re-iteration over problems 258 if module.problems is not None:
259 try: 259 # Iterable and mapping taskweights cause re-iteration over problems
260 len(module.problems) 260 try:
261 except Exception: 261 len(module.problems)
262 module.problems = tuple(module.problems) 262 except Exception:
263 module.problems = tuple(module.problems)
263 global globalconf 264 global globalconf
264 globalconf = module 265 globalconf = module
265 try: 266 try:
266 sys.dont_write_bytecode = dwb 267 sys.dont_write_bytecode = dwb
267 except NameError: 268 except NameError: