Python: separate description of dummy module from docs of run()

This commit is contained in:
Adriaan de Groot 2017-07-05 06:26:21 -04:00 committed by Philip
parent 3f2bba4e33
commit b28edfdc8e

View File

@ -19,22 +19,22 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Calamares. If not, see <http://www.gnu.org/licenses/>. # along with Calamares. If not, see <http://www.gnu.org/licenses/>.
"""
=== 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
went well, or a tuple (str,str) with an error message and description
if something went wrong.
"""
import libcalamares import libcalamares
import os import os
from time import gmtime, strftime, sleep from time import gmtime, strftime, sleep
def run(): def run():
""" """Dummy python job."""
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
went well, or a tuple (str,str) with an error message and description
if something went wrong.
:return:
"""
os.system("/bin/sh -c \"touch ~/calamares-dummypython\"") os.system("/bin/sh -c \"touch ~/calamares-dummypython\"")
accumulator = strftime("%Y-%m-%d %H:%M:%S", gmtime()) + "\n" accumulator = strftime("%Y-%m-%d %H:%M:%S", gmtime()) + "\n"
accumulator += "Calamares version: " + libcalamares.VERSION_SHORT + "\n" accumulator += "Calamares version: " + libcalamares.VERSION_SHORT + "\n"