Skip to content
Browse files

tools: undefined name opts -> args in

./tools/gyp/ F821 undefined name 'opts'
    extra_path = [os.path.abspath(p) for p in opts.path]
`opts.path` is an undefined name in this context while `args.path` is
used on the preceding line and is defined on line 48.  Undefined names
have the potential to raise `NameError` at runtime which will halt the

PR-URL: #30144
Reviewed-By: Michaël Zasso <>
Reviewed-By: Richard Lau <>
Reviewed-By: Luigi Pinca <>
Reviewed-By: Colin Ihrig <>
Reviewed-By: Trivikram Kamat <>
Reviewed-By: Jiawen Geng <>
  • Loading branch information
cclauss authored and targos committed Oct 27, 2019
1 parent 6bc7a6d commit 309c395aba7d712096c5cdf73953bc49716a498b
Showing with 1 addition and 1 deletion.
  1. +1 −1 tools/gyp/
@@ -58,7 +58,7 @@ def main(argv=None):

if args.path:
extra_path = [os.path.abspath(p) for p in opts.path]
extra_path = [os.path.abspath(p) for p in args.path]
extra_path = os.pathsep.join(extra_path)
os.environ['PATH'] = extra_path + os.pathsep + os.environ['PATH']

0 comments on commit 309c395

Please sign in to comment.
You can’t perform that action at this time.