diff options
author | Katarzyna Gorska <k.gorska@samsung.com> | 2017-08-29 14:02:11 +0200 |
---|---|---|
committer | Katarzyna Gorska <k.gorska@samsung.com> | 2017-11-10 15:13:41 +0100 |
commit | 178c64eae25a13482e82520c858e8ebeac506f5a (patch) | |
tree | c22a794138d5f0d3bbcfd53c25dd4d1cd868a1da | |
parent | 17abdb9a58a7defbeecb2383d0bab0e642d3bae7 (diff) | |
download | kickstarter-accepted/tizen/3.0/tv/20171203.092231.tar.gz kickstarter-accepted/tizen/3.0/tv/20171203.092231.tar.bz2 kickstarter-accepted/tizen/3.0/tv/20171203.092231.zip |
Add possibility to parse list of partition filessubmit/tizen_3.0/20171129.080857accepted/tizen/3.0/wearable/20171203.092235accepted/tizen/3.0/tv/20171203.092231accepted/tizen/3.0/mobile/20171203.092304accepted/tizen/3.0/common/20171204.105107tizen_3.0accepted/tizen_3.0_wearableaccepted/tizen_3.0_tvaccepted/tizen_3.0_mobileaccepted/tizen_3.0_common
Kickstarter was not able to correctly parse config files that contained
a list of partition files in "Part" section. Now it is possible to add
several partition files in that section.
Change-Id: I0d71030319ebe9cad642664163890d16c6fb3829
Signed-off-by: Katarzyna Gorska <k.gorska@samsung.com>
-rw-r--r-- | kswriter/KSWriter.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/kswriter/KSWriter.py b/kswriter/KSWriter.py index b5e97a3..bae1e36 100644 --- a/kswriter/KSWriter.py +++ b/kswriter/KSWriter.py @@ -138,9 +138,19 @@ class KSWriter(): ptab = "" for g in [ plat, img ]: if g.has_key("Part"): - f = open("%s/partitions/%s" %(meta_root, g['Part']) ) - ptab = f.read() - f.close() + if type(g['Part']) == str: + t = [g['Part']] + elif type(g['Part']) == list: + t = g['Part'] + ptab = "" + for p in t: + if os.path.exists('%s/partitions/%s' %(meta_root,p)): + f = open("%s/partitions/%s" %(meta_root, p) ) + ptab += f.read() + ptab += "\n" + f.close() + else: + raise KSMetaError('%s/partitions/%s.run not found, aborting.' %(meta_root,p)) conf['Part'] = ptab conf['Post'] = postscript |