From ae645b58e37f97f811eadc3f09014dbc446d8fa8 Mon Sep 17 00:00:00 2001 From: anmaster Date: Thu, 12 Feb 2009 08:11:48 +0000 Subject: [PATCH] Make /python/CFDataFile.py work on both Python 2.x and Python 3.x with no need to run 2to3 for the python 3.x users. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@11459 282e977c-c81d-0410-88c4-b93c2d0d6712 --- python/CFDataFile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/CFDataFile.py b/python/CFDataFile.py index 1b115ef51..5e3ad613e 100644 --- a/python/CFDataFile.py +++ b/python/CFDataFile.py @@ -79,7 +79,7 @@ class CFDataFile: else: header = dic['#'] del dic['#'] - index = dic.keys() + index = list(dic.keys()) index.sort() contents = '#|%s\n' %('|'.join(header)) file.write(contents) @@ -150,7 +150,7 @@ class CFData: def get_keys(self): '''returns a sorted list of the primary keys (usually names) in the datafile''' - keys = self.datadb.keys() + keys = list(self.datadb.keys()) keys.remove('#') keys.sort() return keys