diff options
| author | Christian Clauss <cclauss@me.com> | 2019-10-27 13:30:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-27 13:30:30 +0100 |
| commit | 8d92045d7aaf5a07800f87164c058ea67904497f (patch) | |
| tree | ab5fa70feda7d0d56dfa062d5d9fd06de1c1e657 | |
| parent | f185990738ca6eb781328bfec65c416b5415d1fc (diff) | |
| download | node-new-opts-to-args.tar.gz | |
tools: undefined name opts -> args in gyptest.pyopts-to-args
```
./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.
| -rwxr-xr-x | tools/gyp/gyptest.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gyp/gyptest.py b/tools/gyp/gyptest.py index 9930e78c7b..1a9ffca7a1 100755 --- a/tools/gyp/gyptest.py +++ b/tools/gyp/gyptest.py @@ -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'] |
