summaryrefslogtreecommitdiff
path: root/libmat
diff options
context:
space:
mode:
Diffstat (limited to 'libmat')
-rw-r--r--libmat/archive.py5
-rw-r--r--libmat/mat.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/libmat/archive.py b/libmat/archive.py
index 61028ef..a662e61 100644
--- a/libmat/archive.py
+++ b/libmat/archive.py
@@ -47,6 +47,11 @@ class GenericArchiveStripper(parser.GenericParser):
47 """ 47 """
48 return self.is_clean(list_unsupported=True) 48 return self.is_clean(list_unsupported=True)
49 49
50 def remove_all(self):
51 """ Virtual method to remove all compromising fields
52 """
53 raise NotImplementedError
54
50 55
51class ZipStripper(GenericArchiveStripper): 56class ZipStripper(GenericArchiveStripper):
52 """ Represent a zip file 57 """ Represent a zip file
diff --git a/libmat/mat.py b/libmat/mat.py
index e84c717..d397334 100644
--- a/libmat/mat.py
+++ b/libmat/mat.py
@@ -84,6 +84,8 @@ class XMLParser(xml.sax.handler.ContentHandler): # pragma: no cover
84 84
85 def startElement(self, name, attrs): 85 def startElement(self, name, attrs):
86 """ Called when entering into xml tag 86 """ Called when entering into xml tag
87 :param attrs: Attributes of the `nam` xml tag
88 :param name: Name of the xml tag
87 """ 89 """
88 self.between = True 90 self.between = True
89 self.key = name 91 self.key = name
@@ -91,6 +93,7 @@ class XMLParser(xml.sax.handler.ContentHandler): # pragma: no cover
91 93
92 def endElement(self, name): 94 def endElement(self, name):
93 """ Called when exiting a xml tag 95 """ Called when exiting a xml tag
96 :param name: name of the element
94 """ 97 """
95 if name == 'format': # leaving a fileformat section 98 if name == 'format': # leaving a fileformat section
96 self.list.append(self.dict.copy()) 99 self.list.append(self.dict.copy())
@@ -102,6 +105,7 @@ class XMLParser(xml.sax.handler.ContentHandler): # pragma: no cover
102 105
103 def characters(self, characters): 106 def characters(self, characters):
104 """ Concatenate the content between opening and closing tags 107 """ Concatenate the content between opening and closing tags
108 :param characters: content of the tag
105 """ 109 """
106 if self.between: 110 if self.between:
107 self.content += characters 111 self.content += characters