From 4516213b0ba77097761bebc1e03605f7d78fffeb Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 18 Jul 2014 14:35:42 +0200 Subject: [PATCH] Add some dummy configuration to dummypython, and then show it. --- src/modules/dummypython/main.py | 7 ++++--- src/modules/dummypython/module.conf | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/modules/dummypython/main.py b/src/modules/dummypython/main.py index eae318f0b..73cedf95c 100644 --- a/src/modules/dummypython/main.py +++ b/src/modules/dummypython/main.py @@ -24,8 +24,9 @@ from time import gmtime, strftime def calamares_main(): os.system( "/bin/sh -c \"touch ~/calamares-dummypython\"" ) accumulator = strftime( "%Y-%m-%d %H:%M:%S", gmtime() ) + "\n" - accumulator += "Calamares version: " + libcalamares.VERSION_SHORT + "\n" - accumulator += "This job's name: " + libcalamares.job.prettyName() + "\n" - accumulator += "This job's path: " + libcalamares.job.workingPath() + "\n" + accumulator += "Calamares version: " + libcalamares.shortVersion + "\n" + accumulator += "This job's name: " + libcalamares.job.prettyName + "\n" + accumulator += "This job's path: " + libcalamares.job.workingPath + "\n" + accumulator += str( libcalamares.job.configuration ) return accumulator diff --git a/src/modules/dummypython/module.conf b/src/modules/dummypython/module.conf index 9d8dee8f4..87f3db698 100644 --- a/src/modules/dummypython/module.conf +++ b/src/modules/dummypython/module.conf @@ -6,3 +6,21 @@ name: "dummypython" interface: "python" requires: [] script: "main.py" #assumed relative to the current directory +configuration: + syntax: "YAML map of anything" + example: + whats_this: "module-specific configuration" + from_where: "module.conf" + a_list: + - "item1" + - "item2" + - "item3" + - "item4" + a_list_of_maps: + - name: "an Item" + contents: + - "an element" + - "another element" + - name: "another item" + contents: + - "not much" \ No newline at end of file