mirror of
https://github.com/python/cpython.git
synced 2025-07-27 21:24:32 +00:00
In a number of places code still revers
to "sys.platform == 'mac'" and that is dead code because it refers to a platform that is no longer supported (and hasn't been supported for several releases). Fixes issue #7908 for the trunk.
This commit is contained in:
parent
a8157183b8
commit
9545a23c7f
30 changed files with 70 additions and 267 deletions
|
@ -2028,7 +2028,7 @@ pydoc</strong> by Ka-Ping Yee <ping@lfw.org></font>'''
|
|||
|
||||
class DocServer(BaseHTTPServer.HTTPServer):
|
||||
def __init__(self, port, callback):
|
||||
host = (sys.platform == 'mac') and '127.0.0.1' or 'localhost'
|
||||
host = 'localhost'
|
||||
self.address = ('', port)
|
||||
self.url = 'http://%s:%d/' % (host, port)
|
||||
self.callback = callback
|
||||
|
@ -2145,10 +2145,6 @@ def gui():
|
|||
except ImportError: # pre-webbrowser.py compatibility
|
||||
if sys.platform == 'win32':
|
||||
os.system('start "%s"' % url)
|
||||
elif sys.platform == 'mac':
|
||||
try: import ic
|
||||
except ImportError: pass
|
||||
else: ic.launchurl(url)
|
||||
else:
|
||||
rc = os.system('netscape -remote "openURL(%s)" &' % url)
|
||||
if rc: os.system('netscape "%s" &' % url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue