debian: adapt debian_config.py for Python 3 (#41302)

This commit is contained in:
Benjamin Dauvergne 2020-04-07 21:01:14 +02:00
parent 93ccbc1c39
commit 571965f35e
1 changed files with 4 additions and 3 deletions

View File

@ -124,7 +124,8 @@ if 'GRAYLOG_URL' in os.environ:
}
LOGGING['loggers']['']['handlers'].append('gelf')
execfile(os.path.join(ETC_DIR, 'settings.py'))
main_settings_py = os.path.join(ETC_DIR, 'settings.py')
for filename in sorted(glob.glob(os.path.join(ETC_DIR, 'settings.d', '*.py'))):
execfile(filename)
for filename in [main_settings_py] + sorted(glob.glob(os.path.join(ETC_DIR, 'settings.d', '*.py'))):
with open(filename) as fd:
exec(fd.read())