From 66b9daff688d344018e827cb251b9b118a919d3a Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Wed, 20 Jul 2016 18:40:46 +0200 Subject: [PATCH] Update default_settings.py for python3 In python 3 dict.items do not return a copied list so we force a copy to avoid changing the global dict while iterating over it --- cas_server/default_settings.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cas_server/default_settings.py b/cas_server/default_settings.py index e43cda1..024d59e 100644 --- a/cas_server/default_settings.py +++ b/cas_server/default_settings.py @@ -104,8 +104,9 @@ CAS_SQL_DBNAME = '' CAS_SQL_DBCHARSET = 'utf8' #: The query performed upon user authentication. CAS_SQL_USER_QUERY = 'SELECT user AS usersame, pass AS password, users.* FROM users WHERE user = %s' -#: The method used to check the user password. Must be one of ``crypt``, ``ldap``, ``hex_md5``, -#: ``hex_sha1``, ``hex_sha224``, ``hex_sha256``, ``hex_sha384``, ``hex_sha512``, ``plain``. +#: The method used to check the user password. Must be one of ``"crypt"``, ``"ldap"``, +#: ``"hex_md5"``, ``"hex_sha1"``, ``"hex_sha224"``, ``"hex_sha256"``, ``"hex_sha384"``, +#: ``"hex_sha512"``, ``"plain"``. CAS_SQL_PASSWORD_CHECK = 'crypt' # crypt or plain @@ -131,8 +132,8 @@ CAS_FEDERATE = False #: Time after witch the cookie use for “remember my identity provider” expire (one week). CAS_FEDERATE_REMEMBER_TIMEOUT = 604800 - -for name, default_value in globals().items(): +current_global = globals().copy() +for name, default_value in current_global.items(): # get the current setting value, falling back to default_value value = getattr(settings, name, default_value) # set the setting value to its value if defined, ellse to the default_value.