From: Kurt B. Kaiser Date: Thu, 23 Aug 2007 06:17:40 +0000 (+0000) Subject: os.getcwd() is returning str8; sys.path items are str. X-Git-Tag: v3.0a1~321 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a3b014f31cc661fa25ea61f8713f3f5cfb3fe36;p=thirdparty%2FPython%2Fcpython.git os.getcwd() is returning str8; sys.path items are str. --- diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index a9b8f720bec9..21cdbc57d76e 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -1365,7 +1365,10 @@ def main(): if not dir in sys.path: sys.path.insert(0, dir) else: - dir = os.getcwd() + dir = str(os.getcwd()) ### os.getcwd() returning str8 but sys.path + ### items are type 'str'. Remove the cast + ### when fixed and assertion fails + assert isinstance(os.getcwd(), str8) ### if not dir in sys.path: sys.path.insert(0, dir) # check the IDLE settings configuration (but command line overrides)