diff options
author | Dan McGee <dan@archlinux.org> | 2013-04-17 05:12:01 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-04-17 05:12:01 +0200 |
commit | b7b24740640e24883cd17fd683e1d465fbb343f8 (patch) | |
tree | 0a8a4fdf23f3a3b7f0551e859c36c23e3afe212f /packages/views | |
parent | 31d39e75eea7fb6cdf3bb8bfd8b490d45de04ee9 (diff) | |
download | archweb-b7b24740640e24883cd17fd683e1d465fbb343f8.tar.gz archweb-b7b24740640e24883cd17fd683e1d465fbb343f8.tar.xz |
Various minor code cleanups and fixes
Most of these were suggested by PyCharm, and include everything from
little syntax issues and other bad smells to dead or bad code.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/views')
-rw-r--r-- | packages/views/display.py | 2 | ||||
-rw-r--r-- | packages/views/flag.py | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/packages/views/display.py b/packages/views/display.py index 8742448..021c7ed 100644 --- a/packages/views/display.py +++ b/packages/views/display.py @@ -228,8 +228,6 @@ def download(request, name, repo, arch): if pkg.arch.agnostic: # grab the first non-any arch to fake the download path arch = Arch.objects.exclude(agnostic=True)[0].name - values = { - } url = '{host}{repo}/os/{arch}/{filename}'.format(host=url.url, repo=pkg.repo.name.lower(), arch=arch, filename=pkg.filename) return redirect(url) diff --git a/packages/views/flag.py b/packages/views/flag.py index 5c76e1d..39cdcef 100644 --- a/packages/views/flag.py +++ b/packages/views/flag.py @@ -110,7 +110,7 @@ def flag(request, name, repo, arch): subject = '%s package [%s] marked out-of-date' % \ (pkg.repo.name, pkg.pkgname) for maint in maints: - if maint.userprofile.notify == True: + if maint.userprofile.notify is True: toemail.append(maint.email) if toemail: @@ -133,7 +133,6 @@ def flag(request, name, repo, arch): return redirect('package-flag-confirmed', name=name, repo=repo, arch=arch) else: - initial = {} form = FlagForm(authenticated=authenticated) context = { |