diff options
author | Hello TMW <hello@themanaworld.org> | 2025-03-12 12:16:19 +0000 |
---|---|---|
committer | Hello TMW <hello@themanaworld.org> | 2025-03-12 12:16:19 +0000 |
commit | b0428330565e92350b002d969c90601f90dc47e5 (patch) | |
tree | 1f22af7cf0039ac80e032edad8876ae0e348867c /tools/config.py | |
parent | 3a0bfe045e24a8d769c60b513ade85505926be70 (diff) | |
parent | 88dfbd91ed22ab4ad98b2b9f0243f9d9faa9b49d (diff) | |
download | tmwa-master.tar.gz tmwa-master.tar.bz2 tmwa-master.tar.xz tmwa-master.zip |
Diffstat (limited to 'tools/config.py')
-rwxr-xr-x | tools/config.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/config.py b/tools/config.py index f87fe77..22ece0b 100755 --- a/tools/config.py +++ b/tools/config.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 # config.py - generator for config file parsers @@ -20,8 +20,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function - import glob import os @@ -259,7 +257,7 @@ class Group(object): short_cpp_name = '%s.cpp' % var_name cpp_name = os.path.join(path, short_cpp_name) - values = sorted(self.options.values(), key=lambda o: o.name) + values = sorted(list(self.options.values()), key=lambda o: o.name) desc = 'Config for %s::%s' % (namespace_name, self.name) with OpenWrite(hpp_name) as hpp, \ @@ -384,7 +382,7 @@ class Realm(object): return rv def dump(self): - for g in self.groups.values(): + for g in list(self.groups.values()): g.dump_in(self.path, self.path.split('/')[-1]) class Everything(object): @@ -401,7 +399,7 @@ class Everything(object): def dump(self): for g in glob.glob('src/*/*_conf.[ch]pp'): os.rename(g, g + '.old') - for v in self.realms.values(): + for v in list(self.realms.values()): v.dump() for g in glob.glob('src/*/*_conf.[ch]pp.old'): print('Obsolete: %s' % g) |