Patchwork [bitbake-devel] bin/bitbake: Catch establish connection log messages

login
register
mail settings
Submitter Richard Purdie
Date Oct. 4, 2013, 1:14 p.m.
Message ID <1380892492.18603.601.camel@ted>
Download mbox | patch
Permalink /patch/59253/
State New
Headers show

Comments

Richard Purdie - Oct. 4, 2013, 1:14 p.m.
If for example you try "bitbake -m" with an invalid BBSERVER, error
messages are not dsplayed. This change ensures logging is in place
to catch and display such errors.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
Martin Jansa - Oct. 4, 2013, 2:23 p.m.
On Fri, Oct 04, 2013 at 02:14:52PM +0100, Richard Purdie wrote:
> If for example you try "bitbake -m" with an invalid BBSERVER, error
> messages are not dsplayed. This change ensures logging is in place

small typo         ^
                   displayed

> to catch and display such errors.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
> index 222dabd..21a6c81 100755
> --- a/bitbake/bin/bitbake
> +++ b/bitbake/bin/bitbake
> @@ -297,8 +297,6 @@ def main():
>          server = servermodule.BitBakeXMLRPCClient(configParams.observe_only)
>          server.saveConnectionDetails(configParams.remote_server)
>  
> -    logger.removeHandler(handler)
> -
>      if not configParams.server_only:
>          # Collect the feature set for the UI
>          featureset = getattr(ui_module, "featureSet", [])
> @@ -310,6 +308,8 @@ def main():
>          for k in cleanedvars:
>              os.environ[k] = cleanedvars[k]
>  
> +        logger.removeHandler(handler)
> +
>          try:
>              return ui_module.main(server_connection.connection, server_connection.events, configParams)
>          finally:
> 
> 
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel

Patch

diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 222dabd..21a6c81 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -297,8 +297,6 @@  def main():
         server = servermodule.BitBakeXMLRPCClient(configParams.observe_only)
         server.saveConnectionDetails(configParams.remote_server)
 
-    logger.removeHandler(handler)
-
     if not configParams.server_only:
         # Collect the feature set for the UI
         featureset = getattr(ui_module, "featureSet", [])
@@ -310,6 +308,8 @@  def main():
         for k in cleanedvars:
             os.environ[k] = cleanedvars[k]
 
+        logger.removeHandler(handler)
+
         try:
             return ui_module.main(server_connection.connection, server_connection.events, configParams)
         finally: