summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-02-26 16:28:43 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-02-26 16:28:43 +0000
commit0cf7a27b503d03772e4ab26b6ef993f4092d669a (patch)
tree71fc1966659e7320767c9dba45d8a412c6555bd0 /lib/redmine/scm
parent7b295f379bd16f75cb64d43a5100e19d5cd330f2 (diff)
downloadredmine-0cf7a27b503d03772e4ab26b6ef993f4092d669a.tar.gz
redmine-0cf7a27b503d03772e4ab26b6ef993f4092d669a.zip
use Python getattr instead of hasattr (#16177)
git-svn-id: http://svn.redmine.org/redmine/trunk@12935 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm')
-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 6056dd803..b7d98a18f 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)