summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core/dispatcher.py
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-04-18 22:18:16 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2017-04-19 20:14:28 +0200
commit71c341b9aea1097e0d8f4ccc2eee9728599ea8b0 (patch)
treeea0d6158f857a972294e63064d798663a45b2304 /src/leap/bitmask/core/dispatcher.py
parent5e6de17902f73ea0ac48eeda77216a302bd0872f (diff)
[bug] pass along no polkit error
Diffstat (limited to 'src/leap/bitmask/core/dispatcher.py')
-rw-r--r--src/leap/bitmask/core/dispatcher.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py
index 9d486009..52de62b6 100644
--- a/src/leap/bitmask/core/dispatcher.py
+++ b/src/leap/bitmask/core/dispatcher.py
@@ -537,10 +537,12 @@ def _format_error(failure):
"""
Logs the failure backtrace, and returns a json containing the error
message.
- """
- # If a exception declares the 'expected' attribute as True,
- # we will not print a full traceback
+ If a exception declares the 'expected' attribute as True,
+ we will not print a full traceback. instead, we will dispatch
+ the ``exception`` message attribute as the ``error`` field in the response
+ json.
+ """
expected = getattr(failure.value, 'expected', False)
if not expected: