Proper subclassing

master
Sven Slootweg 11 years ago
parent 2e432dfa61
commit 0f470754e6

@ -41,7 +41,7 @@ class MountException(PytahoeException):
"""Exception class for errors encountered during mounting of a directory.""" """Exception class for errors encountered during mounting of a directory."""
pass pass
class Filesystem: class Filesystem(object):
"""Represents a Tahoe-LAFS 'filesystem' or 'grid'.""" """Represents a Tahoe-LAFS 'filesystem' or 'grid'."""
def __init__(self, url="http://localhost:3456/"): def __init__(self, url="http://localhost:3456/"):
@ -197,7 +197,10 @@ class Filesystem:
else: else:
raise ObjectException("Could not attach object - the request failed with code %d." % result.status_code) raise ObjectException("Could not attach object - the request failed with code %d." % result.status_code)
class Directory: class Node(object):
pass
class Directory(Node):
"""Represents a directory node in a Tahoe-LAFS grid. """Represents a directory node in a Tahoe-LAFS grid.
Properties: Properties:
@ -359,7 +362,7 @@ class Directory:
"""Refreshes the data that this Directory object holds.""" """Refreshes the data that this Directory object holds."""
self._get_data() self._get_data()
class File: class File(Node):
"""Represents a file node in a Tahoe-LAFS grid.""" """Represents a file node in a Tahoe-LAFS grid."""
mutable = False mutable = False
writable = False writable = False

Loading…
Cancel
Save