From 1a55c0f0bc8359f85f6c23d69cdf3ca05a4d25a2 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 28 Jan 2013 13:50:33 -0700 Subject: Don't error on empty torrent data Signed-off-by: Dan McGee --- releng/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'releng') 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 @@ def torrent(self): 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', {}) -- cgit v1.2.3-54-g00ecf