summaryrefslogtreecommitdiff
path: root/tools/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/config.py')
-rwxr-xr-xtools/config.py10
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)