summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-02-26 16:55:12 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-02-26 16:55:12 +0000
commit8d7fd10f908169bd413d9d18d0475c3f3256a4b9 (patch)
treeb54f471fbb516cf5239795d5d4c66bdfbc9e6d0a
parentdac4f38eb478187c33ebddcb024e7c896368fb5c (diff)
downloadredmine-8d7fd10f908169bd413d9d18d0475c3f3256a4b9.tar.gz
redmine-8d7fd10f908169bd413d9d18d0475c3f3256a4b9.zip
Merged r12935 from trunk to 2.4-stable (#16177)
use Python getattr instead of hasattr. git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@12937 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/scm/adapters/mercurial/redminehelper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/scm/adapters/mercurial/redminehelper.py b/lib/redmine/scm/adapters/mercurial/redminehelper.py
index 1e1bc8db1..d9a484e15 100644
--- a/lib/redmine/scm/adapters/mercurial/redminehelper.py
+++ b/lib/redmine/scm/adapters/mercurial/redminehelper.py
@@ -79,7 +79,7 @@ def _tags(ui, repo):
def _branches(ui, repo):
# see mercurial/commands.py:branches
def iterbranches():
- if hasattr(repo, 'branchtags'):
+ if getattr(repo, 'branchtags', None) is not None:
# Mercurial < 2.9
for t, n in repo.branchtags().iteritems():
yield t, n, repo.changelog.rev(n)