summaryrefslogtreecommitdiff
path: root/devel/management/commands
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-03-27 09:48:01 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-03-27 09:48:01 -0400
commitf3185cbe0f85adf7bd257ac409436b9b58188285 (patch)
tree04f1a6520c68d64893af83cc7539ed7adb175bc6 /devel/management/commands
parentfbbcc8534a25d3e78ef3a319c8aeb127bc5085f0 (diff)
commands/reporead: handle null values
Diffstat (limited to 'devel/management/commands')
-rw-r--r--devel/management/commands/reporead.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index fd8e3979..cf98f004 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -107,6 +107,8 @@ class RepoPackage(object):
setattr(self, k, long(v[0]))
elif k in ('desc', 'pgpsig'):
# do NOT prune these values at all
+ if v[0] == None:
+ v[0] = 'missing'
setattr(self, k, v[0])
elif k == 'version':
match = self.version_re.match(v[0])
@@ -212,7 +214,10 @@ def populate_pkg(dbpkg, repopkg, force=False, timestamp=None):
dbpkg.pkgver = repopkg.ver
dbpkg.pkgrel = repopkg.rel
dbpkg.epoch = repopkg.epoch
- dbpkg.pkgdesc = repopkg.desc
+ try:
+ dbpkg.pkgdesc = repopkg.desc
+ except AttributeError:
+ dbpkg.pkgdesc = "missing"
dbpkg.url = repopkg.url
dbpkg.filename = repopkg.filename
dbpkg.compressed_size = repopkg.csize