Fixed pep8 whining in module dummypython

added myself to copyright
main
Alf Gaida 8 years ago
parent 1e26078459
commit 2f45dc0f5d

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

Loading…
Cancel
Save