|
|
|
@ -4,6 +4,7 @@
|
|
|
|
|
# === This file is part of Calamares - <http://github.com/calamares> ===
|
|
|
|
|
#
|
|
|
|
|
# Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
|
|
|
|
# Copyright 2017, Alf Gaida <agaida@siduction.org>
|
|
|
|
|
#
|
|
|
|
|
# Calamares is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
@ -24,7 +25,8 @@ from time import gmtime, strftime, sleep
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def run():
|
|
|
|
|
""" Example Python jobmodule.
|
|
|
|
|
"""
|
|
|
|
|
Example Python jobmodule.
|
|
|
|
|
|
|
|
|
|
A Python jobmodule is a Python program which imports libcalamares and
|
|
|
|
|
has a function run() as entry point. run() must return None if everything
|
|
|
|
@ -40,13 +42,16 @@ def run():
|
|
|
|
|
accumulator += "This job's path: " + libcalamares.job.working_path + "\n"
|
|
|
|
|
accumulator += str(libcalamares.job.configuration)
|
|
|
|
|
accumulator += " *** globalstorage test ***\n"
|
|
|
|
|
accumulator += "lala: " + str(libcalamares.globalstorage.contains("lala")) + "\n"
|
|
|
|
|
accumulator += "foo: " + str(libcalamares.globalstorage.contains("foo")) + "\n"
|
|
|
|
|
accumulator += "lala: "
|
|
|
|
|
accumulator += str(libcalamares.globalstorage.contains("lala")) + "\n"
|
|
|
|
|
accumulator += "foo: "
|
|
|
|
|
accumulator += str(libcalamares.globalstorage.contains("foo")) + "\n"
|
|
|
|
|
accumulator += "count: " + str(libcalamares.globalstorage.count()) + "\n"
|
|
|
|
|
libcalamares.globalstorage.insert("item2", "value2")
|
|
|
|
|
libcalamares.globalstorage.insert("item3", 3)
|
|
|
|
|
accumulator += "keys: {}\n".format(str(libcalamares.globalstorage.keys()))
|
|
|
|
|
accumulator += "remove: {}\n".format(str(libcalamares.globalstorage.remove("item2")))
|
|
|
|
|
accumulator += "remove: {}\n".format(
|
|
|
|
|
str(libcalamares.globalstorage.remove("item2")))
|
|
|
|
|
accumulator += "values: {} {} {}\n".format(
|
|
|
|
|
str(libcalamares.globalstorage.value("foo")),
|
|
|
|
|
str(libcalamares.globalstorage.value("item2")),
|
|
|
|
|