Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7e941c

Browse files
committed
Fix case where programdata is None on windows.
Closes #13408
1 parent 8ec0e42 commit c7e941c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

IPython/core/application.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
)
3535

3636
if os.name == "nt":
37-
programdata = Path(os.environ.get("PROGRAMDATA", None))
38-
if programdata:
39-
SYSTEM_CONFIG_DIRS = [str(programdata / "ipython")]
37+
programdata = os.environ.get("PROGRAMDATA", None)
38+
if programdata is not None:
39+
SYSTEM_CONFIG_DIRS = [str(Path(programdata) / "ipython")]
4040
else: # PROGRAMDATA is not defined by default on XP.
4141
SYSTEM_CONFIG_DIRS = []
4242
else:

0 commit comments

Comments
 (0)