COT.add_file module

Module for adding files to VM definitions.

COTAddFile(ui) Add a file (such as a README) to the package.
class COTAddFile(ui)[source]

Bases: COT.submodule.COTSubmodule

Add a file (such as a README) to the package.

Inherited attributes: ui, package, output

Attributes: file, file_id


Instantiate this submodule with the given UI.

Parameters:ui (UI) – User interface instance.

Create ‘add-file’ CLI subparser.


Check whether the module is ready to run().

Returns:tuple(True, ready_message) or (False, reason_why_not)

Do the actual work of this submodule.

Raises:InvalidInputError – if ready_to_run() reports False

File to be added to the package.

Raises:InvalidInputError – if the file does not exist.
file_id = None

File identifier string.