infocalypse
 
(Steve Dougherty)
2013-08-16: Fix inconsistent resolution failure messages; formatting.

Fix inconsistent resolution failure messages; formatting.

diff --git a/infocalypse/wot_id.py b/infocalypse/wot_id.py
--- a/infocalypse/wot_id.py
+++ b/infocalypse/wot_id.py
@@ -159,12 +159,12 @@ def _get_identity(wot_identifier, truste
         elif response['Replies.Message'] == 'Identities':
             matches = response['Replies.IdentitiesMatched']
             if matches == 0:
-                raise util.Abort("No identities match '{0}'\n".format(
-                    wot_identifier))
+                raise util.Abort("No identities match '{0}'."
+                                 .format(wot_identifier))
             elif matches == 1:
                 return response
             else:
-                raise util.Abort("'{0}' matches more than one identity.\n"
+                raise util.Abort("'{0}' matches more than one identity."
                                  .format(wot_identifier))
 
         # Partial matching not supported, or unknown truster. The only
@@ -183,8 +183,8 @@ def _get_identity(wot_identifier, truste
         # Searching by exact public key hash, not matching.
         raise util.Abort("No identity has the complete public key hash '{0}'. "
                          "({1}) To flexibly match by partial nickname and key "
-                         "use LCWoT for now.\n".format(key_prefix,
-                                                       wot_identifier))
+                         "use LCWoT for now."
+                         .format(key_prefix, wot_identifier))
 
     # There should be only one result.
     # Depends on https://bugs.freenetproject.org/view.php?id=5729
@@ -238,11 +238,12 @@ def _get_local_identity(wot_identifier):
             del matches[key]
 
     if len(matches) > 1:
-        raise util.Abort("'{0}' is ambiguous.\n".format(wot_identifier))
+        raise util.Abort("'{0}' matches more than one local identity."
+                         .format(wot_identifier))
 
     if len(matches) == 0:
-        raise util.Abort("No local identities match '{0}'.\n".format(
-            wot_identifier))
+        raise util.Abort("No local identities match '{0}'."
+                         .format(wot_identifier))
 
     assert len(matches) == 1