refactored actions to use exceptions instead of return-values

This commit is contained in:
fonfon committed 2014-07-10 18:27:49 +03:00
1 parent a40d42eb60
commit 0d5636a900
12 files changed
+62 -72

No files matched your search

+1 -4
View File
@@ -53,10 +53,7 @@ def index(request):
def get_status():
"""Return the current status"""
output, error = actions.run('owncloud-setup', 'status')
if error:
raise Exception('Error getting ownCloud status: %s' % error)
output = actions.run('owncloud-setup', 'status')
return {'enabled': 'enable' in output.split()}