components/openstack/horizon/patches/01-osprofiler.patch
author Sowrabha H G<sowrabha.hg@oracle.com>
Wed, 15 Jul 2015 08:08:35 -0700
branchs11u2-sru
changeset 4650 7a924b284d8d
parent 4156 4b1def16fe9b
child 5405 66fd59fecd68
permissions -rw-r--r--
20479968 net-snmp-config --create-snmpv3-user in GZ fails when snmpd is running in NGZ

In-house patch to address
https://bugs.launchpad.net/osprofiler/+bug/1361235 in Horizon.

--- horizon-2014.2.1/openstack_dashboard/wsgi/django.wsgi.orig	2014-11-13 15:02:19.599694847 -0700
+++ horizon-2014.2.1/openstack_dashboard/wsgi/django.wsgi	2014-11-13 15:03:31.633159017 -0700
@@ -5,7 +5,12 @@ import django.core.handlers.wsgi
 from django.conf import settings
 
 # Add this file path to sys.path in order to import settings
-sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..'))
+
+# XXX workaround until
+# https://bugs.launchpad.net/osprofiler/+bug/1361235 in osprofiler is
+# fixed
+# sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..'))
+sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.realpath('../..')))
 os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'
 sys.stdout = sys.stderr