mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
bitbake: doc/bitbake-user-manual-metadata.rst: fix python task example
Fix the old Python 2 print statement, replace it by a bb.plain() call instead. Also replace time by datetime for a slightly simpler example. [YOCTO #14670] Reported-by: Robert Berger <pokylinux@reliableembeddedsystems.com> (Bitbake rev: 874c607f475f3d60677d2720b80a28d0c2e963c6) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
820824f5fe
commit
43092d6e8d
|
@ -1405,8 +1405,8 @@ the task and other tasks. Here is an example that shows how to define a
|
|||
task and declare some dependencies::
|
||||
|
||||
python do_printdate () {
|
||||
import time
|
||||
print time.strftime('%Y%m%d', time.gmtime())
|
||||
import datetime
|
||||
bb.plain('Date: %s' % (datetime.date.today()))
|
||||
}
|
||||
addtask printdate after do_fetch before do_build
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user