summaryrefslogtreecommitdiffstats
path: root/module/download_thread.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/download_thread.py')
-rw-r--r--module/download_thread.py50
1 files changed, 27 insertions, 23 deletions
diff --git a/module/download_thread.py b/module/download_thread.py
index 65c7e1e23..7c899b185 100644
--- a/module/download_thread.py
+++ b/module/download_thread.py
@@ -1,22 +1,26 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
-#Copyright (C) 2009 sp00b, sebnapi
-#
-#This program is free software; you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation; either version 3 of the License,
-#or (at your option) any later version.
-#
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-#See the GNU General Public License for more details.
-#
-#You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-###
+
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: mkaay
+ @author: spoob
+ @author: sebnapi
+ @version: v0.3
+"""
+
import threading
import traceback
from os.path import join
@@ -108,9 +112,9 @@ class Download_Thread(threading.Thread):
code, msg = e
if code == 7:
sleep(60)
- self.parent.parent.logger.info("Hoster unvailable, wait 60 seconds")
+ self.parent.parent.logger.info(_("Hoster unvailable, wait 60 seconds"))
except Exception, f:
- self.parent.parent.logger.debug("Error getting error code: "+ str(f))
+ self.parent.parent.logger.debug(_("Error getting error code: %s") % f)
if self.parent.parent.config['general']['debug_mode']:
traceback.print_exc()
self.loadedPyFile.status.type = "failed"
@@ -156,13 +160,13 @@ class Download_Thread(threading.Thread):
20 - unknown error
"""
if code == 0:
- self.parent.parent.logger.info("Checksum ok ('%s')" % status.filename)
+ self.parent.parent.logger.info(_("Checksum ok ('%s')") % status.filename)
elif code == 1:
- self.parent.parent.logger.info("Checksum not matched! ('%s')" % status.filename)
+ self.parent.parent.logger.info(_("Checksum not matched! ('%s')") % status.filename)
elif code == 5:
- self.parent.parent.logger.debug("Can't get checksum for %s" % status.filename)
+ self.parent.parent.logger.debug(_("Can't get checksum for %s") % status.filename)
elif code == 10:
- self.parent.parent.logger.debug("Checksum not implemented for %s" % status.filename)
+ self.parent.parent.logger.debug(_("Checksum not implemented for %s") % status.filename)
if not check:
raise Checksum(code, location)