From 882f1aff778b56bbc15222baa0555616f8e102ac Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 19 Jan 2018 19:36:56 +0000 Subject: Replace __getitem__ with find_target_by_relationship_id on Relationships --- mammoth/docx/relationships_xml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mammoth/docx/relationships_xml.py') diff --git a/mammoth/docx/relationships_xml.py b/mammoth/docx/relationships_xml.py index bb9c3ed..8bf3a89 100644 --- a/mammoth/docx/relationships_xml.py +++ b/mammoth/docx/relationships_xml.py @@ -5,8 +5,8 @@ class Relationships(object): def __init__(self, relationships): self._relationships = relationships - def __getitem__(self, key): - return self._relationships[key] + def find_target_by_relationship_id(self, key): + return self._relationships[key].target Relationship = collections.namedtuple("Relationship", ["target"]) -- cgit v1.2.3