Skip to content

Commit 4b8017f

Browse files
committed
Merge branch 'master' of github.com:s2technologies/python_testspace_xml
2 parents a05200e + 68ef528 commit 4b8017f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python_testspace_xml/testspace_xml.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(self, name='unknown', level='info', description=''):
3333
self.name = name
3434
self.level = level
3535
self.description = description
36-
self.mimeType = None
36+
self.mime_type = None
3737
self.file_path = None
3838
self.link_file = False
3939
self.gzip_data = None
@@ -45,7 +45,7 @@ def add_comment(self, name, comment):
4545

4646
def set_file_annotation(self, file_path=None, mime_type='text/plain', string_buffer=None):
4747
self.file_path = file_path
48-
self.mimeType = mime_type
48+
self.mime_type = mime_type
4949
if file_path is not None:
5050
if not os.path.isfile(self.file_path):
5151
self.level = 'error'
@@ -91,7 +91,7 @@ def write_xml(self, parent_element, dom):
9191

9292
if self.gzip_data is not None:
9393
annotation.setAttribute("link_file", "false")
94-
annotation.setAttribute("mime_type", self.mimeType)
94+
annotation.setAttribute("mime_type", self.mime_type)
9595
b64_data = base64.b64encode(self.gzip_data)
9696
b64_data_string = b64_data.decode()
9797
cdata = dom.createCDATASection(b64_data_string)
@@ -157,7 +157,7 @@ def add_file_annotation(self, name, level='info', description='',
157157
def add_string_buffer_annotation(self, name, level='info', description='',
158158
string_buffer=None, mime_type='text/plain'):
159159
fa = Annotation(name, level, description)
160-
fa.set_file_annotation(string_buffer=string_buffer, mime_type='text/plain')
160+
fa.set_file_annotation(string_buffer=string_buffer, mime_type=mime_type)
161161
self.annotations.append(fa)
162162
return fa
163163

@@ -226,7 +226,7 @@ def add_file_annotation(self, name, level='info', description='',
226226
def add_string_buffer_annotation(self, name, level='info', description='',
227227
string_buffer=None, mime_type='text/plain'):
228228
fa = Annotation(name, level, description)
229-
fa.set_file_annotation(string_buffer=string_buffer, mime_type='text/plain')
229+
fa.set_file_annotation(string_buffer=string_buffer, mime_type=mime_type)
230230
self.annotations.append(fa)
231231
return fa
232232

0 commit comments

Comments
 (0)