summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/__init__.py
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-05-11 16:17:01 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-16 22:31:50 +0100
commit7883af3097e043dd5b0f2c6f5f37189d9f70549e (patch)
tree449b76bfab9f172c2c55b8161f72f17b6b296abe /scripts/lib/devtool/__init__.py
parentc977cdf3d85da74ff4f5c9b10bf3caad7cb25204 (diff)
downloadpoky-7883af3097e043dd5b0f2c6f5f37189d9f70549e.tar.gz
devtool: add missing docstrings
(From OE-Core rev: 07b2e731a378c56852e2715f6c001097b81abe46) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
-rw-r--r--scripts/lib/devtool/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index f19d0328f3..88665124d1 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -16,7 +16,7 @@
16# You should have received a copy of the GNU General Public License along 16# You should have received a copy of the GNU General Public License along
17# with this program; if not, write to the Free Software Foundation, Inc., 17# with this program; if not, write to the Free Software Foundation, Inc.,
18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 19"""Devtool plugins module"""
20 20
21import os 21import os
22import sys 22import sys
@@ -26,6 +26,7 @@ import logging
26logger = logging.getLogger('devtool') 26logger = logging.getLogger('devtool')
27 27
28def exec_build_env_command(init_path, builddir, cmd, watch=False, **options): 28def exec_build_env_command(init_path, builddir, cmd, watch=False, **options):
29 """Run a program in bitbake build context"""
29 import bb 30 import bb
30 if not 'cwd' in options: 31 if not 'cwd' in options:
31 options["cwd"] = builddir 32 options["cwd"] = builddir
@@ -49,6 +50,7 @@ def exec_build_env_command(init_path, builddir, cmd, watch=False, **options):
49 return bb.process.run('%s%s' % (init_prefix, cmd), **options) 50 return bb.process.run('%s%s' % (init_prefix, cmd), **options)
50 51
51def exec_watch(cmd, **options): 52def exec_watch(cmd, **options):
53 """Run program with stdout shown on sys.stdout"""
52 if isinstance(cmd, basestring) and not "shell" in options: 54 if isinstance(cmd, basestring) and not "shell" in options:
53 options["shell"] = True 55 options["shell"] = True
54 56
@@ -68,6 +70,7 @@ def exec_watch(cmd, **options):
68 return buf 70 return buf
69 71
70def setup_tinfoil(): 72def setup_tinfoil():
73 """Initialize tinfoil api from bitbake"""
71 import scriptpath 74 import scriptpath
72 bitbakepath = scriptpath.add_bitbake_lib_path() 75 bitbakepath = scriptpath.add_bitbake_lib_path()
73 if not bitbakepath: 76 if not bitbakepath: