summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-28 13:50:33 -0700
committerDan McGee <dan@archlinux.org>2013-01-28 13:50:33 -0700
commit1a55c0f0bc8359f85f6c23d69cdf3ca05a4d25a2 (patch)
treefadac0ec0d1dd51758ab8fee2aafa5d347928727
parent44dde6f02f649244d7c1b9dcf03d8ce592bbbbcb (diff)
Don't error on empty torrent data
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--releng/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/releng/models.py b/releng/models.py
index a0dd57aa..19040905 100644
--- a/releng/models.py
+++ b/releng/models.py
@@ -160,6 +160,8 @@ class Release(models.Model):
data = b64decode(self.torrent_data)
except TypeError:
return None
+ if not data:
+ return None
data = bdecode(data)
# transform the data into a template-friendly dict
info = data.get('info', {})