summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-08-08 02:12:05 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-08 13:15:06 +0100
commit7a4ea1e6a10f20d80009a78f4f0aebf8f90095fd (patch)
treefe18a3e570233d23a687bac4f7fc33b55fd1b57e
parent645c8dd15762516ae5ab64a1df47fadb95d072d1 (diff)
downloadbitbake-contrib-7a4ea1e6a10f20d80009a78f4f0aebf8f90095fd.tar.gz
bitbake-contrib-7a4ea1e6a10f20d80009a78f4f0aebf8f90095fd.tar.bz2
bitbake-contrib-7a4ea1e6a10f20d80009a78f4f0aebf8f90095fd.zip
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@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xlib/bb/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/main.py b/lib/bb/main.py
index c51c6f2e43..eba4aefb54 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",