Common

exception narrenschiff.common.AmbiguousConfiguration[source]

Give warning that something is wrong with configuration.

class narrenschiff.common.DeleteFile(path)[source]

Delete file from the file system, ideally in secure manner.

delete()[source]

Delete the file.

class narrenschiff.common.Singleton(name, bases, attrs, **kwargs)[source]

Define the Singleton.

narrenschiff.common.flatten(lst)[source]

Flatten list.

Parameters

lst (list) – A list to be flattened

Returns

Flattened list

Return type

list

narrenschiff.common.get_chest_file_path(location)[source]

Check if there are duplicate chest files, and return paths if there are not.

Parameters

location (str) – Relative path to course project directory

Returns

Absolute path to chest file

Return type

str

Raises

narrenschiff.common.AmbiguousConfiguration