]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
recipetool: fix unbound variable when fixed SRCREV can't be found
authorAlex Kiernan <alex.kiernan@gmail.com>
Sun, 5 May 2019 05:24:27 +0000 (06:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 May 2019 11:15:17 +0000 (12:15 +0100)
commit568f0ab886cbcf83fcd9f154886280a7881d30fe
treebe8456311e202c8661640224ac020d02fef26d71
parentf0aa7f09a4c752b922d79cc4ef847bc65503abcf
recipetool: fix unbound variable when fixed SRCREV can't be found

If attempting to find a fixed SRCREV fails because the directory doesn't exit,
avoid failing with:

  Traceback (most recent call last):
    File "/home/vagrant/poky/scripts/recipetool", line 121, in <module>
      ret = main()
    File "/home/vagrant/poky/scripts/recipetool", line 110, in main
      ret = args.func(args)
    File "/home/vagrant/poky/scripts/lib/recipetool/create.py", line 707, in create_recipe
      srcrev = stdout.rstrip()
  UnboundLocalError: local variable 'stdout' referenced before assignment

Fixes: 000480c42797 ("recipetool / devtool: set a fixed SRCREV by default when fetching from git")
(From OE-Core rev: 8e4b301573071ea04911b0df6533c25bc4596b93)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create.py