components/openstack/horizon/patches/03-launchpad-1254694.patch
branchs11u2-sru
changeset 4156 4b1def16fe9b
parent 4146 097063f324c0
child 4157 92532a6159e7
equal deleted inserted replaced
4146:097063f324c0 4156:4b1def16fe9b
     1 Although the following patch has been addressed in Icehouse 2014.1, it
       
     2 still has not yet been released for Havana.  It has been modified to
       
     3 apply cleanly into our current Havana implementation
       
     4 
       
     5 commit 05ba5f81c390efbb6e5eb98db62f8f2599389ddb
       
     6 Author: Matt Fischer <[email protected]>
       
     7 Date:   Thu Jan 9 15:35:38 2014 -0700
       
     8 
       
     9     Don't reset LOCAL_PATH if it's already set
       
    10     
       
    11     If LOCAL_PATH is set in local_settings, then settings should
       
    12     not override it, even if SECRET_KEY is unset.
       
    13     
       
    14     Change-Id: I6aca03f65afddffb6cdd00e4084a8ab9b2255ef1
       
    15     Closes-Bug: #1254694
       
    16 
       
    17 diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py
       
    18 --- horizon-2013.2.3/openstack_dashboard/settings.py.~1~	2014-04-03 11:45:53.000000000 -0700
       
    19 +++ horizon-2013.2.3/openstack_dashboard/settings.py	2014-05-25 13:48:46.166574128 -0700
       
    20 @@ -206,6 +206,7 @@
       
    21  }
       
    22  
       
    23  SECRET_KEY = None
       
    24 +LOCAL_PATH = None
       
    25  
       
    26  try:
       
    27      from local.local_settings import *  # noqa
       
    28 @@ -216,9 +217,11 @@
       
    29  # file is present. See local_settings.py.example for full documentation on the
       
    30  # horizon.utils.secret_key module and its use.
       
    31  if not SECRET_KEY:
       
    32 +    if not LOCAL_PATH:
       
    33 +        LOCAL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)),
       
    34 +                                  'local')
       
    35 +
       
    36      from horizon.utils import secret_key
       
    37 -    LOCAL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)),
       
    38 -                              'local')
       
    39      SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH,
       
    40                                                         '.secret_key_store'))
       
    41