Skip to content
Browse files

allow entry document object to be retrieved from deposit request

  • Loading branch information...
1 parent 46c041f commit c73fedfcadd629da43a0aebc53a6cfa4556b9e2d richard-jones committed Jan 22, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 sss/core.py
View
9 sss/core.py
@@ -187,6 +187,8 @@ def _load(self, xml_source):
if self.parsed:
for element in self.dom.getchildren():
+ if isinstance(element, etree._Comment):
+ continue
field = self._canonical_tag(element.tag)
ssslog.debug("Attempting to intepret field: '%s'" % field)
if field == "atom_id" and element.text is not None:
@@ -649,8 +651,15 @@ def __init__(self):
self.content_type = "application/octet-stream"
self.content = None
self.atom = None
+ self.entry_document = None
self.filename = "unnamed.file"
self.too_large = False
+
+ def get_entry_document(self):
+ if self.entry_document is None:
+ if self.atom is not None:
+ self.entry_document = EntryDocument(xml_source=self.atom)
+ return self.entry_document
class DepositResponse(object):
"""

0 comments on commit c73fedf

Please sign in to comment.
Something went wrong with that request. Please try again.