changeset 73:b071ef77377c

String keys in pointmap are no longer treated as iterables except in legacy mode
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 06 Jan 2011 19:58:45 +0200
parents 7520b6bb6636
children aea4fc87698a
files config.py
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/config.py	Thu Jan 06 17:51:59 2011 +0200
+++ b/config.py	Thu Jan 06 19:58:45 2011 +0200
@@ -140,11 +140,14 @@
 			module.path = problem_name
 	newpointmap = {}
 	for key in module.pointmap:
-		try:
-			for k in key:
-				newpointmap[k] = module.pointmap[key]
-		except TypeError:
+		if not options.legacy and isinstance(key, basestring):
 			newpointmap[key] = module.pointmap[key]
+		else:
+			try:
+				for k in key:
+					newpointmap[k] = module.pointmap[key]
+			except TypeError:
+				newpointmap[key] = module.pointmap[key]
 	module.pointmap = newpointmap
 	if options.no_maxtime:
 		module.maxtime = 0