summaryrefslogtreecommitdiffstats
path: root/module/remote/thriftbackend/Handler.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-14 14:26:29 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-14 14:26:29 +0100
commite811e55a8e8e451c6fc7b723f26a6351f997a14e (patch)
tree026b350bd54b40aa73ec115ff9b83800351e1a8d /module/remote/thriftbackend/Handler.py
parentlittle SO fix (diff)
downloadpyload-e811e55a8e8e451c6fc7b723f26a6351f997a14e.tar.xz
some parts of cli working again
Diffstat (limited to 'module/remote/thriftbackend/Handler.py')
-rw-r--r--module/remote/thriftbackend/Handler.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/remote/thriftbackend/Handler.py b/module/remote/thriftbackend/Handler.py
index 91848941b..b1a7349bc 100644
--- a/module/remote/thriftbackend/Handler.py
+++ b/module/remote/thriftbackend/Handler.py
@@ -74,7 +74,7 @@ class Handler(Iface):
self.serverMethods.unpause_server()
def togglePause(self):
- return self.serverMethods.toggle_server()
+ return self.serverMethods.toggle_pause()
def statusServer(self):
status = self.serverMethods.status_server()
@@ -172,6 +172,9 @@ class Handler(Iface):
pdata = PackageData()
rawData = self.serverMethods.get_package_data(pid)
+ if not rawData:
+ raise PackageDoesNotExists(pid)
+
pdata.pid = rawData["id"]
pdata.name = rawData["name"]
pdata.folder = rawData["folder"]
@@ -195,7 +198,8 @@ class Handler(Iface):
if rawData:
rawData = rawData.values()[0]
else:
- return None
+ raise FileDoesNotExists(fid)
+
fdata = self._convertPyFile(rawData)
return fdata