summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorAleksandar Trifunovic <akstrfn@gmail.com>2018-07-30 11:12:43 +0200
committerAleksandar Trifunovic <akstrfn@gmail.com>2019-02-01 21:27:57 +0100
commit203506c9cc2bb2adeb040e5f6c7a74ad6571105e (patch)
treeebed361391e14b524f8f928a1c634ec2d66db0e0 /devel
parentadaa6d64c4466cff986e695d9d69d51a4d05ca59 (diff)
downloadarchweb-203506c9cc2bb2adeb040e5f6c7a74ad6571105e.tar.gz
archweb-203506c9cc2bb2adeb040e5f6c7a74ad6571105e.zip
remove unecessary list calls
Diffstat (limited to 'devel')
-rw-r--r--devel/management/commands/pgp_import.py4
-rw-r--r--devel/management/commands/rematch_developers.py4
-rw-r--r--devel/management/commands/reporead_inotify.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/devel/management/commands/pgp_import.py b/devel/management/commands/pgp_import.py
index 455bbe69..2188de3c 100644
--- a/devel/management/commands/pgp_import.py
+++ b/devel/management/commands/pgp_import.py
@@ -141,7 +141,7 @@ def import_keys(keyring):
finder = UserFinder()
# we are dependent on parents coming before children; parse_keydata
# uses an OrderedDict to ensure this is the case.
- for data in list(keydata.values()):
+ for data in keydata.values():
parent_id = None
if data.parent:
parent_data = keydata.get(data.parent, None)
@@ -161,7 +161,7 @@ def import_keys(keyring):
if created:
created_ct += 1
else:
- for k, v in list(other.items()):
+ for k, v in other.items():
if getattr(dkey, k) != v:
setattr(dkey, k, v)
needs_save = True
diff --git a/devel/management/commands/rematch_developers.py b/devel/management/commands/rematch_developers.py
index 9fd7acf1..7178d1d8 100644
--- a/devel/management/commands/rematch_developers.py
+++ b/devel/management/commands/rematch_developers.py
@@ -62,7 +62,7 @@ def match_packager(finder):
logger.debug(" found user %s", user.username)
matched_count += 1
- for packager_str, user in list(mapping.items()):
+ for packager_str, user in mapping.items():
package_count += Package.objects.filter(packager__isnull=True,
packager_str=packager_str).update(packager=user)
@@ -88,7 +88,7 @@ def match_flagrequest(finder):
logger.debug(" found user %s", user.username)
matched_count += 1
- for user_email, user in list(mapping.items()):
+ for user_email, user in mapping.items():
req_count += FlagRequest.objects.filter(user__isnull=True,
user_email=user_email).update(user=user)
diff --git a/devel/management/commands/reporead_inotify.py b/devel/management/commands/reporead_inotify.py
index eb183060..fadcb881 100644
--- a/devel/management/commands/reporead_inotify.py
+++ b/devel/management/commands/reporead_inotify.py
@@ -187,7 +187,7 @@ class EventHandler(pyinotify.ProcessEvent):
# we really want a single path to arch mapping, so massage the data
arch_paths = kwargs['arch_paths']
- for arch, paths in list(arch_paths.items()):
+ for arch, paths in arch_paths.items():
self.arch_lookup.update((path.rstrip('/'), arch) for path in paths)
def process_default(self, event):