Fix wrong escaping in string format
This commit is contained in:
@@ -6,7 +6,7 @@ from config import *
|
||||
session = requests.Session()
|
||||
|
||||
def list_zones() -> list[dict]:
|
||||
url = f"{TECHNITIUM_API_BASE.rstrip("/")}{LIST_ZONES_ENDPOINT}?token={API_TOKEN}"
|
||||
url = f"{TECHNITIUM_API_BASE.rstrip('/')}{LIST_ZONES_ENDPOINT}?token={API_TOKEN}"
|
||||
logging.debug(f"Listing zones from {url}")
|
||||
r = session.get(url, timeout=15)
|
||||
r.raise_for_status()
|
||||
@@ -23,7 +23,7 @@ def list_zones() -> list[dict]:
|
||||
|
||||
|
||||
def export_zone(zone_name) -> str:
|
||||
url = f"{TECHNITIUM_API_BASE.rstrip("/")}{EXPORT_ZONE_ENDPOINT}?token={API_TOKEN}&zone={zone_name}"
|
||||
url = f"{TECHNITIUM_API_BASE.rstrip('/')}{EXPORT_ZONE_ENDPOINT}?token={API_TOKEN}&zone={zone_name}"
|
||||
r = session.get(url, timeout=30)
|
||||
r.raise_for_status()
|
||||
return r.text
|
Reference in New Issue
Block a user