Skip to content
Snippets Groups Projects
Commit 93095cf9 authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

allow to insert HTCContents into htc section

parent 9d24c597
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -84,9 +84,12 @@ class HTCContents(object): ...@@ -84,9 +84,12 @@ class HTCContents(object):
return object.__setattr__(self, *args, **kwargs) return object.__setattr__(self, *args, **kwargs)
if isinstance(v, str): if isinstance(v, str):
v = [fmt_value(v) for v in v.split()] v = [fmt_value(v) for v in v.split()]
if not isinstance(v, (list, tuple)): if isinstance(v,HTCContents):
v = [v] self.contents[k] = v
self.contents[k] = HTCLine(k, v, "") else:
if not isinstance(v, (list, tuple)):
v = [v]
self.contents[k] = HTCLine(k, v, "")
def __delattr__(self, *args, **kwargs): def __delattr__(self, *args, **kwargs):
k, = args k, = args
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment