summaryrefslogtreecommitdiffstats
path: root/module/remote/thriftbackend/Handler.py
diff options
context:
space:
mode:
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