summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:23:40 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:23:40 -0400
commit8ff271216f421594970631eec1ba156a8a35e561 (patch)
treee56af4f242621c0e0a20a30d9fe881edbc307feb /devel
parent03fa7e4f27bdb39a8f8f5ed91a87d18bf8357b47 (diff)
parentbb18fa3323a0494a2774ea61911572b089d04b6d (diff)
Merge branch 'archweb' into archweb-generic2
Diffstat (limited to 'devel')
-rw-r--r--devel/management/commands/pgp_import.py1
-rw-r--r--devel/management/commands/reporead.py10
-rw-r--r--devel/models.py1
-rw-r--r--devel/utils.py2
-rw-r--r--devel/views.py2
5 files changed, 6 insertions, 10 deletions
diff --git a/devel/management/commands/pgp_import.py b/devel/management/commands/pgp_import.py
index 10e6cfcb..b1f29d77 100644
--- a/devel/management/commands/pgp_import.py
+++ b/devel/management/commands/pgp_import.py
@@ -95,6 +95,7 @@ def parse_keydata(data):
# parse all of the output from our successful GPG command
logger.info("parsing command output")
+ node = None
for line in data.split('\n'):
parts = line.split(':')
if parts[0] == 'pub':
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 1e456c8c..3e835f7c 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -118,13 +118,9 @@ class RepoPackage(object):
builddate = datetime.utcfromtimestamp(int(v[0]))
self.builddate = builddate.replace(tzinfo=utc)
except ValueError:
- try:
- self.builddate = datetime.strptime(v[0],
- '%a %b %d %H:%M:%S %Y')
- except ValueError:
- logger.warning(
- 'Package %s had unparsable build date %s',
- self.name, v[0])
+ logger.warning(
+ 'Package %s had unparsable build date %s',
+ self.name, v[0])
elif k == 'files':
self.files = tuple(v)
self.has_files = True
diff --git a/devel/models.py b/devel/models.py
index 67de40a6..4354e0f2 100644
--- a/devel/models.py
+++ b/devel/models.py
@@ -4,7 +4,6 @@ import pytz
from django.db import models
from django.db.models.signals import pre_save
from django.contrib.auth.models import User
-from django.utils.timezone import now
from django_countries import CountryField
from .fields import PGPKeyField
diff --git a/devel/utils.py b/devel/utils.py
index e8e3a6c4..340841f5 100644
--- a/devel/utils.py
+++ b/devel/utils.py
@@ -131,7 +131,7 @@ class UserFinder(object):
self.username_email, self.user_name)
for matcher in find_methods:
user = matcher(name, email)
- if user != None:
+ if user is not None:
break
self.cache[userstring] = user
diff --git a/devel/views.py b/devel/views.py
index 61c1e568..4258ea7f 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -34,7 +34,7 @@ from .utils import get_annotated_maintainers
@login_required
def index(request):
'''the developer dashboard'''
- if(request.user.is_authenticated()):
+ if request.user.is_authenticated():
inner_q = PackageRelation.objects.filter(user=request.user)
else:
inner_q = PackageRelation.objects.none()