[totem] opensubtitles: Fix downloading subtitles with newer Python
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] opensubtitles: Fix downloading subtitles with newer Python
- Date: Sun, 8 Mar 2015 23:36:32 +0000 (UTC)
commit c76e276b415c458e38966d3ec58cd750452c9b15
Author: Bastien Nocera <hadess hadess net>
Date: Sun Mar 8 23:01:04 2015 +0100
opensubtitles: Fix downloading subtitles with newer Python
Fix error:
UnboundLocalError: local variable 'result' referenced before assignment
by initialising result to None.
src/plugins/opensubtitles/opensubtitles.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/opensubtitles/opensubtitles.py b/src/plugins/opensubtitles/opensubtitles.py
index d23171f..b9cfac4 100644
--- a/src/plugins/opensubtitles/opensubtitles.py
+++ b/src/plugins/opensubtitles/opensubtitles.py
@@ -344,6 +344,7 @@ class OpenSubtitlesModel (object):
(log_in_success, log_in_message) = self._log_in ()
if log_in_success:
+ result = None
try:
result = self._server.DownloadSubtitles (self._token,
[subtitle_id])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]