Try to satisfy pylint and tox:py2

This commit is contained in:
2019-10-29 18:50:41 +01:00
parent 1b727c5b77
commit f4fc1307e2
5 changed files with 13 additions and 8 deletions

View File

@@ -71,16 +71,16 @@ class Program(object): # pylint: disable=too-few-public-methods
sys.path.pop(0)
missing_apps = []
for app in add_apps:
if app not in settings.INSTALLED_APPS:
missing_apps.append(app)
for add_app in add_apps:
if add_app not in settings.INSTALLED_APPS:
missing_apps.append(add_app)
if missing_apps:
sys.stdout.write('{app}: adding {apps} to INSTALLED_APPS\n'.format(app=app, apps=missing_apps))
comment = '### {app}: added apps with django-deploy at {timestamp}'
code = 'INSTALLED_APPS += [\n'
for app in missing_apps:
code += ' \'{}\',\n'.format(app)
for add_app in missing_apps:
code += ' \'{}\',\n'.format(add_app)
code += ']\n'
append_text = '\n' + comment + '\n' + code + '\n'