You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.
To reproduce, create a directory foo. Run the script as below. It will fail with this error.
Assumption: NoneType object is not iterable is quite often a sign of some non-defensive code. In the particular case, its the args.exclude_dirs being accessed in an unsafe manner, as an iterator, with no default set for exclude_dirs = []. I'd suggest either set default args for exclude_dirs, or check first: if args.exclude_dirs is not None:
$ python generate_sugar_files.py --top ./foo/ --var MYPROJ_SOURCES
Traceback (most recent call last):
File "generate_sugar_files.py", line 159, in <module>
Generator.run()
File "generate_sugar_files.py", line 156, in run
generator.create()
File "generate_sugar_files.py", line 116, in create
for x in args.exclude_dirs:
TypeError: 'NoneType' object is not iterable
NOTE: The same command above works if I pass an --exclude_dirs argument to a valid directory to exclude.
The text was updated successfully, but these errors were encountered:
To reproduce, create a directory foo. Run the script as below. It will fail with this error.
Assumption: NoneType object is not iterable is quite often a sign of some non-defensive code. In the particular case, its the args.exclude_dirs being accessed in an unsafe manner, as an iterator, with no default set for exclude_dirs = []. I'd suggest either set default args for exclude_dirs, or check first: if args.exclude_dirs is not None:
NOTE: The same command above works if I pass an --exclude_dirs argument to a valid directory to exclude.
The text was updated successfully, but these errors were encountered: