From: Ivan Udovichenko Date: Fri, 3 Jun 2016 12:20:03 +0000 (+0300) Subject: Get rid of django.utils.log.NullHandler class in local_settings.py X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ab3bbac959d703e6bc6c31aef016859c569628a3;p=openstack-build%2Fhorizon-build.git Get rid of django.utils.log.NullHandler class in local_settings.py Rewritten-From: b70d5b870f4b838d059f8ed33b05e2a16544df02 --- diff --git a/trusty/debian/changelog b/trusty/debian/changelog index 1b281a5..a296ebe 100644 --- a/trusty/debian/changelog +++ b/trusty/debian/changelog @@ -1,4 +1,4 @@ -horizon (2:9.0.0-3) UNRELEASED; urgency=medium +horizon (2:9.0.0-3) unstable; urgency=medium [ Ondřej Nový ] * d/copyright: Changed source URL to https protocol @@ -7,6 +7,9 @@ horizon (2:9.0.0-3) UNRELEASED; urgency=medium * d/openstack-dashboard.{preinst,postinst,postrm}, openstack-dashboard-apache.{preinst,postinst,postrm}: - Pass the correct version to dpkg-maintscript-helper script. + * d/openstack-dashboard.postinst: + - Check if django.utils.log.NullHandler class is being used and + replace it with logging.NullHandler class if it is true. (Closes: #822907) [ Thomas Goirand ] * Horizon doesn't build with python-django-nose in Jessie, so increasing the diff --git a/trusty/debian/openstack-dashboard.postinst b/trusty/debian/openstack-dashboard.postinst index e6b4b82..7d064f5 100644 --- a/trusty/debian/openstack-dashboard.postinst +++ b/trusty/debian/openstack-dashboard.postinst @@ -16,10 +16,13 @@ if [ "$1" = "configure" ] ; then chown www-data:www-data /var/lib/openstack-dashboard/secret-key mkdir -p /etc/openstack-dashboard - if ! [ -f /etc/openstack-dashboard/local_settings.py ] ; then - cp /usr/share/openstack-dashboard/local_settings.py /etc/openstack-dashboard/local_settings.py + DASHBOARD_LOCAL_SETTINGS='/etc/openstack-dashboard/local_settings.py' + if ! [ -f "$DASHBOARD_LOCAL_SETTINGS" ] ; then + cp /usr/share/openstack-dashboard/local_settings.py $DASHBOARD_LOCAL_SETTINGS + fi + if [ -f "$DASHBOARD_LOCAL_SETTINGS" ] && grep -q 'django.utils.log.NullHandler' $DASHBOARD_LOCAL_SETTINGS; then + sed -i 's/django.utils.log.NullHandler/logging.NullHandler/g' $DASHBOARD_LOCAL_SETTINGS fi - if [ -L /usr/share/openstack-dashboard/static ]; then if ! [ $(readlink -s /usr/share/openstack-dashboard/static) = /var/lib/openstack-dashboard/static ]; then ln -fs /var/lib/openstack-dashboard/static /usr/share/openstack-dashboard/static