projects
/
snf-image-creator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2075a76
)
Make sysprep_info return a named tuple
author
Nikos Skalkotos
<skalkoto@grnet.gr>
Fri, 19 Jul 2013 08:09:24 +0000
(11:09 +0300)
committer
Nikos Skalkotos
<skalkoto@grnet.gr>
Tue, 30 Jul 2013 13:43:59 +0000
(16:43 +0300)
It used to return a tuple
image_creator/os_type/__init__.py
patch
|
blob
|
history
diff --git
a/image_creator/os_type/__init__.py
b/image_creator/os_type/__init__.py
index
e41c52c
..
3ac92be
100644
(file)
--- a/
image_creator/os_type/__init__.py
+++ b/
image_creator/os_type/__init__.py
@@
-138,7
+138,10
@@
class OSBase(object):
"""Returns information about a sysprep object"""
assert self._is_sysprep(obj), "Object is not a sysprep"
- return (obj.__name__.replace('_', '-'), textwrap.dedent(obj.__doc__))
+ SysprepInfo = namedtuple("SysprepInfo", "name description")
+
+ return SysprepInfo(obj.__name__.replace('_', '-'),
+ textwrap.dedent(obj.__doc__))
def get_sysprep_by_name(self, name):
"""Returns the sysprep object with the given name"""