equal
deleted
inserted
replaced
50 class abstractvfs(object): |
50 class abstractvfs(object): |
51 """Abstract base class; cannot be instantiated""" |
51 """Abstract base class; cannot be instantiated""" |
52 |
52 |
53 def __init__(self, *args, **kwargs): |
53 def __init__(self, *args, **kwargs): |
54 '''Prevent instantiation; don't call this from subclasses.''' |
54 '''Prevent instantiation; don't call this from subclasses.''' |
55 raise NotImplementedError(b'attempted instantiating ' + str(type(self))) |
55 raise NotImplementedError('attempted instantiating ' + str(type(self))) |
56 |
56 |
57 def _auditpath(self, path, mode): |
57 def _auditpath(self, path, mode): |
58 raise NotImplementedError |
58 raise NotImplementedError |
59 |
59 |
60 def tryread(self, path): |
60 def tryread(self, path): |
587 def __enter__(self): |
587 def __enter__(self): |
588 self._origfh.__enter__() |
588 self._origfh.__enter__() |
589 return self |
589 return self |
590 |
590 |
591 def __exit__(self, exc_type, exc_value, exc_tb): |
591 def __exit__(self, exc_type, exc_value, exc_tb): |
592 raise NotImplementedError(b'attempted instantiating ' + str(type(self))) |
592 raise NotImplementedError('attempted instantiating ' + str(type(self))) |
593 |
593 |
594 def close(self): |
594 def close(self): |
595 raise NotImplementedError(b'attempted instantiating ' + str(type(self))) |
595 raise NotImplementedError('attempted instantiating ' + str(type(self))) |
596 |
596 |
597 |
597 |
598 class delayclosedfile(closewrapbase): |
598 class delayclosedfile(closewrapbase): |
599 """Proxy for a file object whose close is delayed. |
599 """Proxy for a file object whose close is delayed. |
600 |
600 |