[oe-commits] [bitbake] 02/04: main: Remove unneeded float()
git at git.openembedded.org
git at git.openembedded.org
Tue Aug 8 12:16:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 7a4ea1e6a10f20d80009a78f4f0aebf8f90095fd
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Tue Aug 8 02:12:05 2017 -0700
main: Remove unneeded float()
There is already a type=float, so the float() is not needed, which also makes
the error clearer:
$ export BB_SERVER_TIMEOUT=10000AA
With float():
$ bitbake quilt-native
[snip]
ValueError: could not convert string to float: '10000AA'
Without float():
$ bitbake quilt-native
[snip]
optparse.OptionValueError: option --idle-timeout: invalid floating-point value: '10000AA'
The second one tells clearly where is wrong.
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/main.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bb/main.py b/lib/bb/main.py
index c51c6f2..eba4aef 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -259,7 +259,7 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
help="The name/address for the bitbake xmlrpc server to bind to.")
parser.add_option("-T", "--idle-timeout", type=float, dest="server_timeout",
- default=float(os.environ.get("BB_SERVER_TIMEOUT", 0)) or None,
+ default=os.environ.get("BB_SERVER_TIMEOUT", 0) or None,
help="Set timeout to unload bitbake server due to inactivity")
parser.add_option("", "--no-setscene", action="store_true",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list