diff --git a/scripts/generate-ini.py b/scripts/generate-ini.py --- a/scripts/generate-ini.py +++ b/scripts/generate-ini.py @@ -1,10 +1,8 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 """ Based on kallithea/lib/paster_commands/template.ini.mako, generate development.ini """ -from __future__ import print_function - import re from kallithea.lib import inifile @@ -62,6 +60,13 @@ def main(): print('writing:', makofile) open(makofile, 'w').write(mako_marked_up) + lines = re.findall(r'\n(# [^ ].*)', mako_marked_up) + if lines: + print('ERROR: the template .ini file convention is to use "## Foo Bar" for text comments and "#foo = bar" for disabled settings') + for line in lines: + print(line) + raise SystemExit(1) + # create ini files for fn, settings in ini_files: print('updating:', fn)