from urllib2 import Request\r
from urlparse import urlparse, urlunparse
from xml.etree.cElementTree import parse\r
-import gettext, re, socket, urllib, urllib2\r
+import gettext, re, socket, sys, urllib, urllib2\r
\r
##############################################################################\r
\r
s.connect((host, port))\r
s.send(http_data)\r
s.close()\r
- except:\r
- pass
+ except:
+ writeLog("Error while reconnecting fritz.Box: " + str(sys.exc_info()))
##############################################################################
file_list.sort()\r
writeLog("Count of lists: " + str(len(file_list)))\r
except:\r
- file_list = []\r
- writeLog("Could not find any list!")
+ file_list = []
+ writeLog("Could not find any list: " + str(sys.exc_info()))
added_downloads = 0\r
for x in file_list:\r
list = path + x\r
file_list = listdir(path)\r
except:\r
file_list = []
+ writeLog("Error while searching for lists: " + str(sys.exc_info()))
finished_downloads = []
for download in self.downloads:\r
f = open(list, "w")\r
f.write(content)\r
f.close()\r
- except:\r
- writeLog("Error while cleaning list %s!"%list)\r
+ except:
+ writeLog("Error while cleaning list %s: %s" % (list, str(sys.exc_info())))\r
self.startDownloading()\r
\r
def removeDownload(self, url):\r
try:\r
file_list = listdir(path)\r
except:\r
- file_list = []\r
+ file_list = []
+ writeLog("Error while searching for lists: " + str(sys.exc_info()))\r
for x in file_list:\r
list = path + x\r
try:\r
f = open(list, "w")\r
f.write(content)\r
f.close()\r
- except:\r
- pass\r
+ except:
+ writeLog("Error while removing link from list: " + str(sys.exc_info()))\r
\r
def clearFinishedDownload(self, url):\r
idx = 0\r
break
f.close()
except:
- pass
+ writeLog("Error while reading rar archive from list: " + str(sys.exc_info()))
if package:
self.package = package
if self.password:
else:
self.command = "unrar -o+ x %s %s"%(package, config.plugins.RSDownloader.downloads_directory.value)
else:
- writeLog("Error finding rar-archives in list: %s"%self.name)
+ writeLog("Error finding rar-archives in list: " + self.name)
def startUnrar(self):
self.working = True
f.write(result)
f.close()
except:
- print "[RS Downloader] Result of unrar:",result
+ print "[RS Downloader] Result of unrar:", result
self.finishCallback(self.name)
def allDownloaded(self):
try:\r
file_list = listdir(config.plugins.RSDownloader.lists_directory.value)\r
except:\r
- file_list = []\r
+ file_list = []
+ writeLog("Error while searching for container files: " + str(sys.exc_info()))\r
list = []\r
for file in file_list:\r
if file.lower().endswith(".ccf") or file.lower().endswith(".dlc") or file.lower().endswith(".rsdf"):\r
f.write("%s\n"%link)\r
f.close()
remove(file)\r
- except:\r
- pass\r
+ except:
+ writeLog("Error while writing list file: " + str(sys.exc_info()))\r
self.refreshTimer.stop()\r
rapidshare.startDownloading()\r
self.updateList()