diff options
author | mkaay <mkaay@mkaay.de> | 2011-02-13 20:45:33 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2011-02-13 20:45:33 +0100 |
commit | 4c39545bbeb661c564b392fe3ff28fab2713a53e (patch) | |
tree | adcfc665f8b1f83b6d608c994bd21b166be24910 /module/remote | |
parent | fixes + improvements (diff) | |
download | pyload-4c39545bbeb661c564b392fe3ff28fab2713a53e.tar.xz |
collector size
Diffstat (limited to 'module/remote')
-rw-r--r-- | module/remote/thriftbackend/Handler.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/module/remote/thriftbackend/Handler.py b/module/remote/thriftbackend/Handler.py index 6e1377938..91848941b 100644 --- a/module/remote/thriftbackend/Handler.py +++ b/module/remote/thriftbackend/Handler.py @@ -191,7 +191,11 @@ class Handler(Iface): Parameters: - fid """ - rawData = self.serverMethods.get_file_data(fid).values()[0] + rawData = self.serverMethods.get_file_data(fid) + if rawData: + rawData = rawData.values()[0] + else: + return None fdata = self._convertPyFile(rawData) return fdata @@ -372,7 +376,7 @@ class Handler(Iface): packs = self.serverMethods.get_collector() for pid in packs: pack = self.serverMethods.get_package_data(pid) - while pack["order"] in order.keys(): + while pack["order"] in order.keys(): #just in case pack["order"] += 1 order[pack["order"]] = pack["id"] return order @@ -385,6 +389,8 @@ class Handler(Iface): rawData = self.serverMethods.get_package_data(pid) order = {} for pyfile in rawData["links"]: + while pyfile["order"] in order.keys(): #just in case + pyfile["order"] += 1 order[pyfile["order"]] = pyfile["id"] return order |