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-b93c2d0d6712master
parent
d037e074c6
commit
ae645b58e3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue