From c133e853f850a81620dc61ff5ac4e576bf6ce390 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 4 Oct 2014 13:27:02 +0200 Subject: [PATCH] only pass non default timeout --- oxdata/movie/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/oxdata/movie/models.py b/oxdata/movie/models.py index 4f1ff4a..a419432 100644 --- a/oxdata/movie/models.py +++ b/oxdata/movie/models.py @@ -104,8 +104,11 @@ class Imdb(models.Model): data['title'] = data['title'].strip() return data - def update(self): - info = ox.web.imdb.ImdbCombined(self.imdb) + def update(self, timeout=None): + if timeout != None: + info = ox.web.imdb.ImdbCombined(self.imdb, timeout=timeout) + else: + info = ox.web.imdb.ImdbCombined(self.imdb) info = self.apply_patch(info) if info: for key in self.keys: