[~] Minor
This commit is contained in:
10
src/main.py
10
src/main.py
@@ -312,6 +312,8 @@ class VMKer:
|
||||
self.template = _vm
|
||||
self.vm.add(_vm.name)
|
||||
container_view.Destroy()
|
||||
logger.debug(f"{self.vm=}")
|
||||
logger.debug(f"{self.template=}")
|
||||
|
||||
def _create(self):
|
||||
if len(sys.argv) > 3:
|
||||
@@ -341,8 +343,8 @@ class VMKer:
|
||||
for n in new_names:
|
||||
if n in self.vm:
|
||||
return logger.error(f"Error: {n!r} already exist.")
|
||||
if not template_name not in self.vm:
|
||||
return logger.error(f"Template not found: {template_name}")
|
||||
if not self.template:
|
||||
return logger.error(f"Template: {template_name} - not found")
|
||||
logger.debug("template found")
|
||||
|
||||
if self.config['resource_pool']:
|
||||
@@ -391,7 +393,9 @@ class VMKer:
|
||||
case "help":
|
||||
print("HELP")
|
||||
case _:
|
||||
logger.warning("Unknown command.")
|
||||
print(f"Usage: {sys.argv[0]} [init|edit|create|help]")
|
||||
else:
|
||||
print(f"Usage: {sys.argv[0]} [init|edit|create|help]")
|
||||
except KeyboardInterrupt:
|
||||
logger.info("Exited by KeyboardInterrupt")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user