[oe-commits] [bitbake] 15/20: toaster: use current directory if BUILDDIR is not set
git at git.openembedded.org
git at git.openembedded.org
Fri Nov 4 12:55:55 UTC 2016
rpurdie pushed a commit to branch master
in repository bitbake.
commit da631152a0db3f432709a05ff15a268d784ca3ab
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Mon Oct 31 16:40:37 2016 +0000
toaster: use current directory if BUILDDIR is not set
If BUILDDIR environment variable is not set signal_runbuilds function
throws TypeError as os.getenv('BUILDDIR') returns None:
ERROR: unsupported operand type(s) for +=: 'NoneType' and 'str'
Traceback (most recent call last):
File "bitbake/lib/bb/ui/toasterui.py", line
391, in main
buildinfohelper.update_build_information(event, errors, warnings,
taskfailures)
File "bitbake/lib/bb/ui/buildinfohelper.py",
line 1184, in update_build_information
self.internal_state['build'], errors, warnings, taskfailures)
File "bitbake/lib/bb/ui/buildinfohelper.py",
line 238, in update_build_stats_and_outcome
signal_runbuilds()
File "bitbake/lib/toaster/orm/models.py", line
1746, in signal_runbuilds
'.runbuilds.pid')) as pidf:
File "/usr/lib64/python3.4/posixpath.py", line 82, in join
path += b
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
Used os.getenv('BUILDIR', '.') to make it always return meaningful
directory path. Current directory '.' will be used if BUILDDIR is
not set.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/toaster/orm/models.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 9a4db1e..4f8510c 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -1742,7 +1742,7 @@ def invalidate_cache(**kwargs):
def signal_runbuilds():
"""Send SIGUSR1 to runbuilds process"""
try:
- with open(os.path.join(os.getenv('BUILDDIR'),
+ with open(os.path.join(os.getenv('BUILDDIR', '.'),
'.runbuilds.pid')) as pidf:
os.kill(int(pidf.read()), SIGUSR1)
except FileNotFoundError:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list