##// END OF EJS Templates
bookmarks: use getattr instead of hasattr
Augie Fackler -
r14946:28762bf8 default
parent child Browse files
Show More
@@ -151,11 +151,10 b' def update(repo, parents, node):'
151 def listbookmarks(repo):
151 def listbookmarks(repo):
152 # We may try to list bookmarks on a repo type that does not
152 # We may try to list bookmarks on a repo type that does not
153 # support it (e.g., statichttprepository).
153 # support it (e.g., statichttprepository).
154 if not hasattr(repo, '_bookmarks'):
154 marks = getattr(repo, '_bookmarks', {})
155 return {}
156
155
157 d = {}
156 d = {}
158 for k, v in repo._bookmarks.iteritems():
157 for k, v in marks.iteritems():
159 d[k] = hex(v)
158 d[k] = hex(v)
160 return d
159 return d
161
160
General Comments 0
You need to be logged in to leave comments. Login now