Fix various typos
This commit is contained in:
@@ -63,7 +63,7 @@ in
|
|||||||
constraints = mkOption {
|
constraints = mkOption {
|
||||||
default = { };
|
default = { };
|
||||||
description = ''
|
description = ''
|
||||||
Contraints for the module
|
Constraints for the module
|
||||||
|
|
||||||
The following example requires exactly one `server`
|
The following example requires exactly one `server`
|
||||||
and supports up to `7` clients
|
and supports up to `7` clients
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ API.register(open_file)
|
|||||||
|
|
||||||
# seems direct 'key in dict' doesnt work here
|
# seems direct 'key in dict' doesnt work here
|
||||||
if arg_name not in sig.parameters.keys(): # noqa: SIM118
|
if arg_name not in sig.parameters.keys(): # noqa: SIM118
|
||||||
msg = f"Argument {arg_name} not found in api method '{method_name}'. Avilable arguments: {list(sig.parameters.keys())}"
|
msg = f"Argument {arg_name} not found in api method '{method_name}'. Available arguments: {list(sig.parameters.keys())}"
|
||||||
raise ClanError(msg)
|
raise ClanError(msg)
|
||||||
|
|
||||||
param = sig.parameters.get(arg_name)
|
param = sig.parameters.get(arg_name)
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ def create_machine(opts: CreateOptions) -> None:
|
|||||||
inventory["machines"] = inventory.get("machines", {})
|
inventory["machines"] = inventory.get("machines", {})
|
||||||
inventory["machines"][machine_name] = new_machine
|
inventory["machines"][machine_name] = new_machine
|
||||||
|
|
||||||
# Commit at the end in that order to avoid commiting halve-baked machines
|
# Commit at the end in that order to avoid committing halve-baked machines
|
||||||
# TODO: automatic rollbacks if something goes wrong
|
# TODO: automatic rollbacks if something goes wrong
|
||||||
set_inventory(inventory, clan_dir, "Imported machine from template")
|
set_inventory(inventory, clan_dir, "Imported machine from template")
|
||||||
|
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ def _check_can_migrate(
|
|||||||
msg = f"Cannot migrate facts for generator {generator.name} as some files already exist in the store"
|
msg = f"Cannot migrate facts for generator {generator.name} as some files already exist in the store"
|
||||||
raise ClanError(msg)
|
raise ClanError(msg)
|
||||||
if all_files_present:
|
if all_files_present:
|
||||||
# all filles already migrated, no need to run migration again
|
# all files already migrated, no need to run migration again
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# ensure that all files can be migrated (exists in the corresponding fact store)
|
# ensure that all files can be migrated (exists in the corresponding fact store)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ def init_state(certificate: str, key: str) -> None:
|
|||||||
# write the initial bootstrap config file
|
# write the initial bootstrap config file
|
||||||
with moonlight_state_file().open("w") as file:
|
with moonlight_state_file().open("w") as file:
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
# bytearray ojbects are not supported by ConfigParser,
|
# bytearray objects are not supported by ConfigParser,
|
||||||
# so we need to adjust them ourselves
|
# so we need to adjust them ourselves
|
||||||
config.add_section("General")
|
config.add_section("General")
|
||||||
config.set("General", "certificate", convert_string_to_bytearray(certificate))
|
config.set("General", "certificate", convert_string_to_bytearray(certificate))
|
||||||
|
|||||||
Reference in New Issue
Block a user