diff --git a/inside/authentication.py b/inside/authentication.py index 1011d2d..f96c682 100644 --- a/inside/authentication.py +++ b/inside/authentication.py @@ -73,7 +73,7 @@ class InsideBackend(object): def _update_user_flags(self): flag_to_group = settings.INSIDE_AUTH_USER_FLAGS_SYNC user_groups = self.user.groups.values_list('name', flat=True) - for flag, group in flag_to_group.iteritems(): + for flag, group in flag_to_group.items(): if group in user_groups: setattr(self.user, flag, True) else: diff --git a/neuf_ldap/utils.py b/neuf_ldap/utils.py index 8a4599a..2e57684 100644 --- a/neuf_ldap/utils.py +++ b/neuf_ldap/utils.py @@ -137,7 +137,7 @@ def ldap_update_user_details(inside_user, dry_run=False): 'full_name': full_name, 'display_name': full_name, } - for key, value in name_data.iteritems(): + for key, value in name_data.items(): setattr(ldap_user, key, value) if not dry_run: diff --git a/neuf_userinfo/management/commands/delete_from_ldap.py b/neuf_userinfo/management/commands/delete_from_ldap.py index ddce14d..76d1a91 100644 --- a/neuf_userinfo/management/commands/delete_from_ldap.py +++ b/neuf_userinfo/management/commands/delete_from_ldap.py @@ -57,7 +57,7 @@ class Command(BaseCommand): if self.options['no_prompt']: return True - val = raw_input('Do you want to permanently remove {} \'{}\'? [y/N]'.format(object_type, username)) + val = input('Do you want to permanently remove {} \'{}\'? [y/N]'.format(object_type, username)) try: confirmed = distutils.util.strtobool(val) except ValueError: diff --git a/neuf_userinfo/management/commands/sync_active_to_internal_systems.py b/neuf_userinfo/management/commands/sync_active_to_internal_systems.py index 46e29d1..8d0379b 100644 --- a/neuf_userinfo/management/commands/sync_active_to_internal_systems.py +++ b/neuf_userinfo/management/commands/sync_active_to_internal_systems.py @@ -102,7 +102,7 @@ class Command(BaseCommand): return ldap_users_diffable def sync_users(self, inside_users_diffable, ldap_users_diffable): - for username, user in inside_users_diffable.iteritems(): + for username, user in inside_users_diffable.items(): if username not in ldap_users_diffable: # Create create_ldap_user(user, dry_run=self.options['dry_run']) @@ -168,4 +168,4 @@ class Command(BaseCommand): inside_user['username'], ','.join(missing_groups))) - return in_sync \ No newline at end of file + return in_sync diff --git a/neuf_userinfo/router.py b/neuf_userinfo/router.py index 6407bc7..0582e20 100644 --- a/neuf_userinfo/router.py +++ b/neuf_userinfo/router.py @@ -24,13 +24,13 @@ class Router(object): return None def db_for_read(self, model, **hints): - "Point all operations on models connection_name to db=connection_name" + """Point all operations on models connection_name to db=connection_name""" if is_routed_model(model): return model.connection_name return None def db_for_write(self, model, **hints): - "Point all operations on models connection_name to db=connection_name" + """Point all operations on models connection_name to db=connection_name""" if is_routed_model(model): return model.connection_name return None diff --git a/templates/base.html b/templates/base.html index d8cc8b2..c1ded76 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,7 +4,7 @@