Mercurial > public > mercurial-scm > hg
diff mercurial/pure/osutil.py @ 31644:f80d9ddc40f3
py3: abuse r'' to preserve str-ness of literals passed to __setattr__()
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 26 Mar 2017 16:33:12 +0900 |
parents | 82f1ef8b4477 |
children | a9c71d578a1c |
line wrap: on
line diff
--- a/mercurial/pure/osutil.py Sun Mar 26 17:12:06 2017 +0900 +++ b/mercurial/pure/osutil.py Sun Mar 26 16:33:12 2017 +0900 @@ -342,8 +342,8 @@ # unfortunately, f.name is '<fdopen>' at this point -- so we store # the name on this wrapper. We cannot just assign to f.name, # because that attribute is read-only. - object.__setattr__(self, 'name', name) - object.__setattr__(self, '_file', f) + object.__setattr__(self, r'name', name) + object.__setattr__(self, r'_file', f) def __iter__(self): return self._file