Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tools: undefined name opts -> args in gyptest.py
```
./tools/gyp/gyptest.py:61:47: 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 script.
  • Loading branch information
cclauss authored Oct 27, 2019
commit 8d92045d7aaf5a07800f87164c058ea67904497f
2 changes: 1 addition & 1 deletion tools/gyp/gyptest.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def main(argv=None):
os.chdir(args.chdir)

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']

Expand Down