]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: fix undefined variable reference in check_arg_path()
authorPatrick Ohly <patrick.ohly@intel.com>
Tue, 10 Jan 2017 11:46:58 +0000 (12:46 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Feb 2017 11:26:32 +0000 (11:26 +0000)
'arg' isn't defined, the right name there is 'p'.

This fixes a rather obscure error message when that code path
ends up being taken:

$ runqemu some/existing-file-name
runqemu - ERROR - name 'arg' is not defined
runqemu - ERROR - Try 'runqemu help' on how to use it

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
scripts/runqemu

index d74f252ec14a1a51c182327c35361e9096849b18..195f4328100cedbf6ecec1a58d0f282e18463eb2 100755 (executable)
@@ -314,7 +314,7 @@ class BaseConfig(object):
             else:
                 raise Exception("Can't find FSTYPE from: %s" % p)
 
-        elif os.path.isdir(p) or re.search(':', arg) and re.search('/', arg):
+        elif os.path.isdir(p) or re.search(':', p) and re.search('/', p):
             if self.is_deploy_dir_image(p):
                 logger.info('DEPLOY_DIR_IMAGE: %s' % p)
                 self.set("DEPLOY_DIR_IMAGE", p)