Skip to content
Snippets Groups Projects
Commit 98b805d4 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

safehasattr: pass attribute name as string instead of bytes

This is a step toward replacing `util.safehasattr` usage with plain `hasattr`.
The builtin function behave poorly in Python2 but this was fixed in Python3.

These change are done one by one as they tend to have a small odd to trigger
puzzling breackage.
parent b539c60a
No related branches found
No related tags found
2 merge requests!618Draft: 6.5rc0,!555simple preliminary changes toward getting ride of "util.safehasattr"
......@@ -400,7 +400,7 @@
# type: (localrepo.localrepository) -> bytes
"""return path to this (sub)repo as seen from outermost repo"""
parent = repo
while util.safehasattr(parent, b'_subparent'):
while util.safehasattr(parent, '_subparent'):
parent = parent._subparent
return repo.root[len(pathutil.normasprefix(parent.root)) :]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment