equal
deleted
inserted
replaced
478 """Base class of wrapper, which hooks closing |
478 """Base class of wrapper, which hooks closing |
479 |
479 |
480 Do not instantiate outside of the vfs layer. |
480 Do not instantiate outside of the vfs layer. |
481 """ |
481 """ |
482 def __init__(self, fh): |
482 def __init__(self, fh): |
483 object.__setattr__(self, '_origfh', fh) |
483 object.__setattr__(self, r'_origfh', fh) |
484 |
484 |
485 def __getattr__(self, attr): |
485 def __getattr__(self, attr): |
486 return getattr(self._origfh, attr) |
486 return getattr(self._origfh, attr) |
487 |
487 |
488 def __setattr__(self, attr, value): |
488 def __setattr__(self, attr, value): |
505 |
505 |
506 Do not instantiate outside of the vfs layer. |
506 Do not instantiate outside of the vfs layer. |
507 """ |
507 """ |
508 def __init__(self, fh, closer): |
508 def __init__(self, fh, closer): |
509 super(delayclosedfile, self).__init__(fh) |
509 super(delayclosedfile, self).__init__(fh) |
510 object.__setattr__(self, '_closer', closer) |
510 object.__setattr__(self, r'_closer', closer) |
511 |
511 |
512 def __exit__(self, exc_type, exc_value, exc_tb): |
512 def __exit__(self, exc_type, exc_value, exc_tb): |
513 self._closer.close(self._origfh) |
513 self._closer.close(self._origfh) |
514 |
514 |
515 def close(self): |
515 def close(self): |
616 |
616 |
617 Do not instantiate outside of the vfs layer. |
617 Do not instantiate outside of the vfs layer. |
618 """ |
618 """ |
619 def __init__(self, fh): |
619 def __init__(self, fh): |
620 super(checkambigatclosing, self).__init__(fh) |
620 super(checkambigatclosing, self).__init__(fh) |
621 object.__setattr__(self, '_oldstat', util.filestat(fh.name)) |
621 object.__setattr__(self, r'_oldstat', util.filestat(fh.name)) |
622 |
622 |
623 def _checkambig(self): |
623 def _checkambig(self): |
624 oldstat = self._oldstat |
624 oldstat = self._oldstat |
625 if oldstat.stat: |
625 if oldstat.stat: |
626 newstat = util.filestat(self._origfh.name) |
626 newstat = util.filestat(self._origfh.name) |