aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx/relationships_xml.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2018-01-19 19:36:56 +0000
committerMichael Williamson <mike@zwobble.org>2018-01-19 19:36:56 +0000
commit882f1aff778b56bbc15222baa0555616f8e102ac (patch)
tree931fa395a4ec7a3307cf4a8d96491d5918888ed2 /mammoth/docx/relationships_xml.py
parentceb05a609ee9323ab0ecea9aee473939f1149461 (diff)
Replace __getitem__ with find_target_by_relationship_id on Relationships
Diffstat (limited to 'mammoth/docx/relationships_xml.py')
-rw-r--r--mammoth/docx/relationships_xml.py4
1 files changed, 2 insertions, 2 deletions
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"])