summaryrefslogtreecommitdiff
path: root/todolists
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-11-16 16:37:31 -0600
committerDan McGee <dan@archlinux.org>2012-11-16 16:37:53 -0600
commit9e9157d0a8cbf9ea076231e438fb30f58bff8e29 (patch)
tree5c9a9711003d6eb4e5396c1c730a912bbbfc2204 /todolists
parent6dd4d54bb0adbbb0f8c2b1beaa92b7a58971cf88 (diff)
Use python set comprehension syntax supported in 2.7
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'todolists')
-rw-r--r--todolists/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/todolists/views.py b/todolists/views.py
index b8d1dae1..9984ef9a 100644
--- a/todolists/views.py
+++ b/todolists/views.py
@@ -53,8 +53,8 @@ def view(request, list_id):
# we don't hold onto the result, but the objects are the same here,
# so accessing maintainers in the template is now cheap
attach_maintainers(tp.pkg for tp in todolist.packages)
- arches = set(tp.pkg.arch for tp in todolist.packages)
- repos = set(tp.pkg.repo for tp in todolist.packages)
+ arches = {tp.pkg.arch for tp in todolist.packages}
+ repos = {tp.pkg.repo for tp in todolist.packages}
return render(request, 'todolists/view.html', {
'list': todolist,
'svn_roots': svn_roots,
@@ -67,8 +67,8 @@ def list_pkgbases(request, list_id, svn_root):
'''Used to make bulk moves of packages a lot easier.'''
todolist = get_object_or_404(Todolist, id=list_id)
repos = get_list_or_404(Repo, svn_root=svn_root)
- pkgbases = set(tp.pkg.pkgbase for tp in todolist.packages
- if tp.pkg.repo in repos)
+ pkgbases = {tp.pkg.pkgbase for tp in todolist.packages
+ if tp.pkg.repo in repos}
return HttpResponse('\n'.join(sorted(pkgbases)),
mimetype='text/plain')