File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 import idlelib .PyShell
33except ImportError :
44 # IDLE is not installed, but maybe PyShell is on sys.path:
5- try :
6- from . import PyShell
7- except ImportError :
8- raise
9- else :
10- import os
11- idledir = os .path .dirname (os .path .abspath (PyShell .__file__ ))
12- if idledir != os .getcwd ():
13- # We're not in the IDLE directory, help the subprocess find run.py
14- pypath = os .environ .get ('PYTHONPATH' , '' )
15- if pypath :
16- os .environ ['PYTHONPATH' ] = pypath + ':' + idledir
17- else :
18- os .environ ['PYTHONPATH' ] = idledir
19- PyShell .main ()
5+ from . import PyShell
6+ import os
7+ idledir = os .path .dirname (os .path .abspath (PyShell .__file__ ))
8+ if idledir != os .getcwd ():
9+ # We're not in the IDLE directory, help the subprocess find run.py
10+ pypath = os .environ .get ('PYTHONPATH' , '' )
11+ if pypath :
12+ os .environ ['PYTHONPATH' ] = pypath + ':' + idledir
13+ else :
14+ os .environ ['PYTHONPATH' ] = idledir
15+ PyShell .main ()
2016else :
2117 idlelib .PyShell .main ()
Original file line number Diff line number Diff line change @@ -340,10 +340,7 @@ def putmessage(self, message):
340340 n = self .sock .send (s [:BUFSIZE ])
341341 except (AttributeError , TypeError ):
342342 raise OSError ("socket no longer exists" )
343- except OSError :
344- raise
345- else :
346- s = s [n :]
343+ s = s [n :]
347344
348345 buff = b''
349346 bufneed = 4
You can’t perform that action at this time.
0 commit comments