summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-25 12:04:22 -0400
committerKali Kaneko <kali@leap.se>2017-08-30 16:18:14 -0400
commitded1a7c7550320a9f321c80e56891bcc75fc2da1 (patch)
tree1d22912db42f1f9269aeb44d7239ff536690b581
parentcef98e7a4b00bca59289e0c447c9e9de88503bf5 (diff)
[refactor] change status to "failed"
-rw-r--r--docs/core/index.rst2
-rw-r--r--src/leap/bitmask/cli/command.py2
-rw-r--r--src/leap/bitmask/core/mail_services.py6
-rw-r--r--src/leap/bitmask/util.py2
4 files changed, 6 insertions, 6 deletions
diff --git a/docs/core/index.rst b/docs/core/index.rst
index 5b74f122..6b450e72 100644
--- a/docs/core/index.rst
+++ b/docs/core/index.rst
@@ -419,7 +419,7 @@ JSON-encoded data to the POST.
* ``off``
* ``starting``
* ``stopping``
- * ``failure``
+ * ``failed``
The possible values for the ``keys`` field are:
* ``null`` - nothing is known about the private key status.
diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py
index 76ac1f25..72d1ebcf 100644
--- a/src/leap/bitmask/cli/command.py
+++ b/src/leap/bitmask/cli/command.py
@@ -75,7 +75,7 @@ def print_status(status, depth=0):
line = Fore.RESET + name.ljust(12)
if v['status'] in ('on', 'starting'):
line += Fore.GREEN
- elif v['status'] == 'failure':
+ elif v['status'] == 'failed':
line += Fore.RED
line += v['status']
if v.get('error'):
diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py
index f159ca14..4a5f9798 100644
--- a/src/leap/bitmask/core/mail_services.py
+++ b/src/leap/bitmask/core/mail_services.py
@@ -282,7 +282,7 @@ class KeymanagerContainer(Container):
def _log_key_error(failure):
self.log.failure('Error while generating key!')
error = "Error generating key: %s" % failure.getErrorMessage()
- self._set_status(userid, "failure", error=error)
+ self._set_status(userid, "failed", error=error)
return failure
self.log.info('Looking up private key for %s' % userid)
@@ -831,8 +831,8 @@ class IncomingMailService(service.MultiService):
return d
def _errback(self, failure, userid):
- self._set_status(userid, "failure", error=str(failure))
- self.log.failure('failure!')
+ self._set_status(userid, "failed", error=str(failure))
+ self.log.failure('failed!')
# --------------------------------------------------------------------
#
diff --git a/src/leap/bitmask/util.py b/src/leap/bitmask/util.py
index b070d9a8..6971ca0a 100644
--- a/src/leap/bitmask/util.py
+++ b/src/leap/bitmask/util.py
@@ -54,7 +54,7 @@ def merge_status(children):
"off": 1,
"starting": 10,
"stopping": 11,
- "failure": 100
+ "failed": 100
}
return level.get(status["status"], -1)