]> code.ossystems Code Review - openembedded-core.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)
committerArmin Kuster <akuster808@gmail.com>
Thu, 9 May 2019 01:30:44 +0000 (18:30 -0700)
commit326188e1e2424bdabe9cf83a8087b5ee046aa7f6
tree107da8cd2091fc1e6a41a5c2b36af9cf4347be6a
parent0da5f86e05ff63e9362cc9b216c7e6007c0de26f
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")
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
scripts/lib/recipetool/create.py