diff options
author | Fazlul Shahriar <fshahriar@gmail.com> | 2010-11-01 16:37:17 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-11-01 16:37:17 -0400 |
commit | 0e816f5972b2bebe62960e6066cb87c75bb009dd (patch) | |
tree | 94013fd6c800c9b3a15965658ff6f2a90a1fb76b | |
parent | 270bad3939b7fff4e012995add174e8f08becbc5 (diff) | |
download | go-0e816f5972b2bebe62960e6066cb87c75bb009dd.tar.gz go-0e816f5972b2bebe62960e6066cb87c75bb009dd.zip |
codereview: fix 'hg sync' and 'hg download' in Python 2.7
Fixes #1218.
R=rsc
CC=golang-dev
https://golang.org/cl/2664041
-rw-r--r-- | lib/codereview/codereview.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 73c47d9993..0095a6d59a 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -1508,7 +1508,7 @@ def IsRietveldSubmitted(ui, clname, hex): if feed is None: return False for sum in feed.findall("{http://www.w3.org/2005/Atom}entry/{http://www.w3.org/2005/Atom}summary"): - text = sum.findtext("", None).strip() + text = sum.text.strip() m = re.match('\*\*\* Submitted as [^*]*?([0-9a-f]+) \*\*\*', text) if m is not None and len(m.group(1)) >= 8 and hex.startswith(m.group(1)): return True @@ -1542,7 +1542,7 @@ def DownloadCL(ui, repo, clname): # Find author - first entry will be author who created CL. nick = None for author in feed.findall("{http://www.w3.org/2005/Atom}entry/{http://www.w3.org/2005/Atom}author/{http://www.w3.org/2005/Atom}name"): - nick = author.findtext("", None).strip() + nick = author.text.strip() break if not nick: return None, None, "CL has no author" |