Skip to content

Commit 2d512b1

Browse files
committed
Fix crash when no -e
`tox-envfile` has begun crashing when `tox` is run without any `-e` argument: ```terminal Traceback (most recent call last): ... File ".../.tox/.tox/lib/python3.8/site-packages/tox_envfile/main.py", line 13, in tox_configure for env in config.option.env: TypeError: 'NoneType' object is not iterable ``` I have no idea what changed in `tox-envfile` to cause this to start happening, but this commit attempts to fix the issue.
1 parent d43136a commit 2d512b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tox_envfile/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
def tox_configure(config):
1111
envvars = dotenv.dotenv_values(os.path.join(config.toxinidir, ".devdata.env"))
1212

13-
for env in config.option.env:
13+
for envconfig in config.envconfigs.values():
1414
for name, value in envvars.items():
15-
config.envconfigs[env].setenv[name] = value
15+
envconfig.setenv[name] = value

0 commit comments

Comments
 (0)