mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merged revisions 74075,74187,74197,74201,74216,74225 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74075 | georg.brandl | 2009-07-18 05:06:31 -0400 (Sat, 18 Jul 2009) | 1 line #6505: fix typos. ........ r74187 | benjamin.peterson | 2009-07-23 10:19:08 -0400 (Thu, 23 Jul 2009) | 1 line use bools for autoraise ........ r74197 | benjamin.peterson | 2009-07-24 22:03:48 -0400 (Fri, 24 Jul 2009) | 1 line clarify ........ r74201 | amaury.forgeotdarc | 2009-07-25 12:22:06 -0400 (Sat, 25 Jul 2009) | 2 lines Better name a variable: 'buf' seems to imply a mutable buffer. ........ r74216 | michael.foord | 2009-07-26 17:12:14 -0400 (Sun, 26 Jul 2009) | 1 line Issue 6581. Michael Foord ........ r74225 | kurt.kaiser | 2009-07-27 12:09:28 -0400 (Mon, 27 Jul 2009) | 5 lines 1. Clean workspace more thoughly before build. 2. Add url of branch we are building to 'results' webpage. (url is now available in $repo_path, could be added to failure email.) 3. Adjust permissions to improve upload reliability. ........
This commit is contained in:
parent
e9ce1fb543
commit
e223eb8477
6 changed files with 45 additions and 30 deletions
|
@ -994,7 +994,10 @@ def getinnerframes(tb, context=1):
|
|||
tb = tb.tb_next
|
||||
return framelist
|
||||
|
||||
currentframe = sys._getframe
|
||||
if hasattr(sys, '_getframe'):
|
||||
currentframe = sys._getframe
|
||||
else:
|
||||
currentframe = lambda _=None: None
|
||||
|
||||
def stack(context=1):
|
||||
"""Return a list of records for the stack above the caller's frame."""
|
||||
|
|
|
@ -56,7 +56,7 @@ def get(using=None):
|
|||
# It is recommended one does "import webbrowser" and uses webbrowser.open(url)
|
||||
# instead of "from webbrowser import *".
|
||||
|
||||
def open(url, new=0, autoraise=1):
|
||||
def open(url, new=0, autoraise=True):
|
||||
for name in _tryorder:
|
||||
browser = get(name)
|
||||
if browser.open(url, new, autoraise):
|
||||
|
@ -145,7 +145,7 @@ class BaseBrowser(object):
|
|||
self.name = name
|
||||
self.basename = name
|
||||
|
||||
def open(self, url, new=0, autoraise=1):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
raise NotImplementedError
|
||||
|
||||
def open_new(self, url):
|
||||
|
@ -169,7 +169,7 @@ class GenericBrowser(BaseBrowser):
|
|||
self.args = name[1:]
|
||||
self.basename = os.path.basename(self.name)
|
||||
|
||||
def open(self, url, new=0, autoraise=1):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
cmdline = [self.name] + [arg.replace("%s", url)
|
||||
for arg in self.args]
|
||||
try:
|
||||
|
@ -186,7 +186,7 @@ class BackgroundBrowser(GenericBrowser):
|
|||
"""Class for all browsers which are to be started in the
|
||||
background."""
|
||||
|
||||
def open(self, url, new=0, autoraise=1):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
cmdline = [self.name] + [arg.replace("%s", url)
|
||||
for arg in self.args]
|
||||
try:
|
||||
|
@ -217,7 +217,7 @@ class UnixBrowser(BaseBrowser):
|
|||
raise_opt = []
|
||||
if remote and self.raise_opts:
|
||||
# use autoraise argument only for remote invocation
|
||||
autoraise = int(bool(autoraise))
|
||||
autoraise = int(autoraise)
|
||||
opt = self.raise_opts[autoraise]
|
||||
if opt: raise_opt = [opt]
|
||||
|
||||
|
@ -257,7 +257,7 @@ class UnixBrowser(BaseBrowser):
|
|||
else:
|
||||
return not p.wait()
|
||||
|
||||
def open(self, url, new=0, autoraise=1):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
if new == 0:
|
||||
action = self.remote_action
|
||||
elif new == 1:
|
||||
|
@ -341,7 +341,7 @@ class Konqueror(BaseBrowser):
|
|||
for more information on the Konqueror remote-control interface.
|
||||
"""
|
||||
|
||||
def open(self, url, new=0, autoraise=1):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
# XXX Currently I know no way to prevent KFM from opening a new win.
|
||||
if new == 2:
|
||||
action = "newTab"
|
||||
|
@ -429,7 +429,7 @@ class Grail(BaseBrowser):
|
|||
s.close()
|
||||
return 1
|
||||
|
||||
def open(self, url, new=0, autoraise=1):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
if new:
|
||||
ok = self._remote("LOADNEW " + url)
|
||||
else:
|
||||
|
@ -512,7 +512,7 @@ if os.environ.get("TERM"):
|
|||
|
||||
if sys.platform[:3] == "win":
|
||||
class WindowsDefault(BaseBrowser):
|
||||
def open(self, url, new=0, autoraise=1):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
try:
|
||||
os.startfile(url)
|
||||
except WindowsError:
|
||||
|
@ -546,7 +546,7 @@ except ImportError:
|
|||
pass
|
||||
else:
|
||||
class InternetConfig(BaseBrowser):
|
||||
def open(self, url, new=0, autoraise=1):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
ic.launchurl(url)
|
||||
return True # Any way to get status?
|
||||
|
||||
|
@ -567,7 +567,7 @@ if sys.platform == 'darwin':
|
|||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
def open(self, url, new=0, autoraise=1):
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
assert "'" not in url
|
||||
# hack for local urls
|
||||
if not ':' in url:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue