mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
refactored actions to use exceptions instead of return-values
This commit is contained in:
1 parent
a40d42eb60
commit
0d5636a900
12 files changed
+62
-72
No files matched your search
@@ -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()}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user