Commit 46370902 authored by Aurélien Dunand's avatar Aurélien Dunand Committed by Seblu

Backport OrderedDict and use it with description's ConfigParser

OrderedDict code come from http://code.activestate.com/recipes/576693/Signed-off-by: Seblu's avatarSébastien Luttringer <sebastien.luttringer@smartjog.com>
parent adb0fbc7
......@@ -40,6 +40,7 @@ import time
import installsystems
import installsystems.template as istemplate
import installsystems.tools as istools
from installsystems.ordereddict import OrderedDict
from installsystems.exception import *
from installsystems.printer import *
from installsystems.tools import PipeFile
......@@ -634,7 +635,7 @@ class SourceImage(Image):
d = dict()
try:
descpath = os.path.join(self.base_path, "description")
cp = ConfigParser.RawConfigParser()
cp = ConfigParser.RawConfigParser(dict_type=OrderedDict)
cp.readfp(codecs.open(descpath, "r", "UTF-8"))
for n in ("name","version", "description", "author"):
d[n] = cp.get("image", n)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment