We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f3176 commit 9e1de24Copy full SHA for 9e1de24
nibabel/xmlutils.py
@@ -28,10 +28,7 @@ def to_xml(self, enc='utf-8'):
28
""" Output should be an xml string with the given encoding.
29
(default: utf-8)"""
30
ele = self._to_xml_element()
31
- if ele is None:
32
- return ''
33
- else:
34
- return tostring(ele, enc)
+ return '' if ele is None else tostring(ele, enc)
35
36
37
class XmlBasedHeader(FileBasedHeader, XmlSerializable):
0 commit comments