infocalypse
 
(Steve Dougherty)
2013-06-04: Move status messages out of wot module.

Move status messages out of wot module. Error messages makes sense as the module knows best what the error is, but it does not know the context of usage.

diff --git a/infocalypse/__init__.py b/infocalypse/__init__.py
--- a/infocalypse/__init__.py
+++ b/infocalypse/__init__.py
@@ -387,6 +387,9 @@ def infocalypse_create(ui_, repo, **opts
         nick_prefix, repo_desc = opts['wot'].split('/', 1)
 
         import wot
+
+        ui_.status("Querying WoT for local identities.\n")
+
         attributes = wot.resolve_local_identity(ui_, nick_prefix)
         if attributes is None:
             # Something went wrong; the function already printed an error.
diff --git a/infocalypse/wot.py b/infocalypse/wot.py
--- a/infocalypse/wot.py
+++ b/infocalypse/wot.py
@@ -5,7 +5,7 @@ import fcp
 
 def resolve_local_identity(ui, nickname_prefix=None):
     """
-    Mercurial ui for status updates and error messages.
+    Mercurial ui for error messages.
     Nickname prefix should be enough to not be ambiguous.
     # TODO: Does not support duplicate nicknames between local identities.
     # Could support looking at identity to resolve further.
@@ -14,7 +14,6 @@ def resolve_local_identity(ui, nickname_
     and identity that match the given criteria.
     In the case of an error prints a message and returns None.
     """
-    ui.status("Querying WoT for local identities.\n")
     node = fcp.FCPNode()
     response =\
         node.fcpPluginMessage(async=False,