Abstraction violations in web/info.py #918

Open
opened 2010-01-20 00:00:55 +00:00 by davidsarah · 0 comments
davidsarah commented 2010-01-20 00:00:55 +00:00
Owner

At source:src/allmydata/web/info.py?rev=4164#L92 , we see

  if IDirectoryNode.providedBy(node):
      node = node._node

(and similarly in a few other methods of MoreInfo).

This is getting the underlying file node for a directory node, but it's doing it by getting the _node attribute, which follows the private instance variable convention. Probably there should be a method on IFilesystemNode to get the underlying file node (which would return self for non-directory nodes).

At source:src/allmydata/web/info.py?rev=4164#L92 , we see ``` if IDirectoryNode.providedBy(node): node = node._node ``` (and similarly in a few other methods of `MoreInfo`). This is getting the underlying file node for a directory node, but it's doing it by getting the `_node` attribute, which follows the private instance variable convention. Probably there should be a method on `IFilesystemNode` to get the underlying file node (which would return `self` for non-directory nodes).
tahoe-lafs added the
code-frontend-web
minor
defect
1.5.0
labels 2010-01-20 00:00:55 +00:00
tahoe-lafs added this to the undecided milestone 2010-01-20 00:00:55 +00:00
tahoe-lafs modified the milestone from undecided to 1.7.0 2010-02-01 19:46:25 +00:00
tahoe-lafs modified the milestone from 1.7.0 to eventually 2010-04-12 17:15:59 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#918
No description provided.