mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 23:01:15 +02:00
style: remove f-strings without placeholders
This commit is contained in:
11 files changed
+16
-16
No files matched your search
@@ -173,7 +173,7 @@ def delete_template_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) ->
|
||||
template_id = matches[0]["template_id"]
|
||||
|
||||
conn.http_call("delete", f"{conn.base_url}/templates/{template_id}")
|
||||
return {"message": f"Template deleted"}
|
||||
return {"message": "Template deleted"}
|
||||
|
||||
|
||||
# ── Tool definitions ───────────────────────────────────────────────────────
|
||||
|
||||
@@ -178,7 +178,7 @@ class Qemu(BaseManager):
|
||||
|
||||
qemu_img_path = shutil.which("qemu-img")
|
||||
if not qemu_img_path:
|
||||
raise QemuError(f"Could not find qemu-img binary")
|
||||
raise QemuError("Could not find qemu-img binary")
|
||||
|
||||
try:
|
||||
if os.path.exists(disk_image_path):
|
||||
|
||||
@@ -241,7 +241,7 @@ class VirtualBoxVM(BaseNode):
|
||||
try:
|
||||
tree = ET.parse(linked_vbox_file)
|
||||
except ET.ParseError:
|
||||
raise VirtualBoxError(f"Cannot modify VirtualBox linked node file. File {{linked_vbox_file}} is corrupted.")
|
||||
raise VirtualBoxError("Cannot modify VirtualBox linked node file. File {linked_vbox_file} is corrupted.")
|
||||
except OSError as e:
|
||||
raise VirtualBoxError(f"Cannot modify VirtualBox linked nodes file '{self._linked_vbox_file()}': {e}")
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ class Controller:
|
||||
|
||||
protocol = server_config.protocol.value
|
||||
if self._ssl_context and protocol != "https":
|
||||
log.warning(f"Protocol changed to 'https' for local compute because SSL is enabled")
|
||||
log.warning("Protocol changed to 'https' for local compute because SSL is enabled")
|
||||
protocol = "https"
|
||||
try:
|
||||
self._local_server = await self.add_compute(
|
||||
|
||||
@@ -168,7 +168,7 @@ async def disconnect_from_db(app: FastAPI) -> None:
|
||||
# dispose of the connection pool used by the database engine
|
||||
if app.state._db_engine:
|
||||
await app.state._db_engine.dispose()
|
||||
log.info(f"Disconnected from database")
|
||||
log.info("Disconnected from database")
|
||||
|
||||
|
||||
async def get_computes(app: FastAPI) -> List[schemas.Compute]:
|
||||
|
||||
@@ -214,7 +214,7 @@ def default_images_directory(image_type):
|
||||
elif image_type == "dynamips" or image_type == "ios":
|
||||
return os.path.join(img_dir, "IOS")
|
||||
else:
|
||||
raise NotImplementedError(f"%s node type is not supported", image_type)
|
||||
raise NotImplementedError("%s node type is not supported", image_type)
|
||||
|
||||
|
||||
def images_directories(image_type, include_parent_directory=True):
|
||||
|
||||
Reference in new issue
Block a user