mercurial/pure/osutil.py
changeset 31644 f80d9ddc40f3
parent 30925 82f1ef8b4477
child 32367 a9c71d578a1c
equal deleted inserted replaced
31643:6ceb3c4c3ab6 31644:f80d9ddc40f3
   340 
   340 
   341             f = os.fdopen(fd, pycompat.sysstr(mode), bufsize)
   341             f = os.fdopen(fd, pycompat.sysstr(mode), bufsize)
   342             # unfortunately, f.name is '<fdopen>' at this point -- so we store
   342             # unfortunately, f.name is '<fdopen>' at this point -- so we store
   343             # the name on this wrapper. We cannot just assign to f.name,
   343             # the name on this wrapper. We cannot just assign to f.name,
   344             # because that attribute is read-only.
   344             # because that attribute is read-only.
   345             object.__setattr__(self, 'name', name)
   345             object.__setattr__(self, r'name', name)
   346             object.__setattr__(self, '_file', f)
   346             object.__setattr__(self, r'_file', f)
   347 
   347 
   348         def __iter__(self):
   348         def __iter__(self):
   349             return self._file
   349             return self._file
   350 
   350 
   351         def __getattr__(self, name):
   351         def __getattr__(self, name):