Skip to content

Commit d7c43e6

Browse files
author
Steve Canny
committed
part: make blob optional on construction
If sub-class decides to keep track of part content, by for example transforming it into an ElementTree element and converting it back to XML on blob() call, there is no need for Part base class to keep a duplicate copy of the original content.
1 parent 63a3852 commit d7c43e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opc/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class Part(object):
9797
intended to be subclassed in client code to implement specific part
9898
behaviors.
9999
"""
100-
def __init__(self, partname, content_type, blob):
100+
def __init__(self, partname, content_type, blob=None):
101101
super(Part, self).__init__()
102102
self._partname = partname
103103
self._content_type = content_type

0 commit comments

Comments
 (0)