summaryrefslogtreecommitdiffstats
path: root/lib/bb/main.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-08-08 02:12:08 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-08 13:15:24 +0100
commit923d5567be6fd9969ca74c166f36817ec09305e3 (patch)
treeddf7ae4ad53066700c9e1ece9f783be83b6a9f7d /lib/bb/main.py
parent7b739a38601b053d9bea4df2c0b44a952ab670c4 (diff)
downloadbitbake-contrib-923d5567be6fd9969ca74c166f36817ec09305e3.tar.gz
main: Handle BB_SERVER_TIMEOUT = -1 for no server timeout
Make BB_SERVER_TIMEOUT = -1 mean no unload forever. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/main.py')
-rwxr-xr-xlib/bb/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/main.py b/lib/bb/main.py
index eba4aefb5..0418d52b8 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -259,8 +259,10 @@ 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=os.environ.get("BB_SERVER_TIMEOUT", 0) or None,
- help="Set timeout to unload bitbake server due to inactivity")
+ default=os.getenv("BB_SERVER_TIMEOUT"),
+ help="Set timeout to unload bitbake server due to inactivity, "
+ "set to -1 means no unload, "
+ "default: Environment variable BB_SERVER_TIMEOUT.")
parser.add_option("", "--no-setscene", action="store_true",
dest="nosetscene", default=False,