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

Skip to content

Commit 9a3b014

Browse files
committed
os.getcwd() is returning str8; sys.path items are str.
1 parent e071277 commit 9a3b014

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/idlelib/PyShell.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,10 @@ def main():
13651365
if not dir in sys.path:
13661366
sys.path.insert(0, dir)
13671367
else:
1368-
dir = os.getcwd()
1368+
dir = str(os.getcwd()) ### os.getcwd() returning str8 but sys.path
1369+
### items are type 'str'. Remove the cast
1370+
### when fixed and assertion fails
1371+
assert isinstance(os.getcwd(), str8) ###
13691372
if not dir in sys.path:
13701373
sys.path.insert(0, dir)
13711374
# check the IDLE settings configuration (but command line overrides)

0 commit comments

Comments
 (0)