replace "str(" with f"format{example}"

This commit is contained in:
2025-04-23 14:18:06 +02:00
parent aa66f4dc68
commit 3bab0710a4
5 changed files with 64 additions and 90 deletions

View File

@ -33,14 +33,14 @@ if not keyfile.is_file():
shutil.chown(keyfile, 1000, 1000)
if dirname.exists():
tl = os.listdir(str(dirname))
CPTH = str(keyfile)
tl = os.listdir(f"{dirname}")
CPTH = f"{keyfile}"
CRYPTFILES = CPTH[:-9]
if keyfile.exists() and len(tl) != 0:
for tunnels in tl:
sourcetl = str(dirname) + "/" + tunnels
tlname = CRYPTFILES + tunnels[:-5] + ".dat"
sourcetl = f"{dirname}/{tunnels}"
tlname = f"{CRYPTFILES}{tunnels[:-5]}.dat"
check_call(
[
"openssl",
@ -59,14 +59,14 @@ if not keyfile.is_file():
else:
if dirname.exists():
tl = os.listdir(str(dirname))
CPTH = str(keyfile)
tl = os.listdir(f"{dirname}")
CPTH = f"{keyfile}"
CRYPTFILES = CPTH[:-9]
if keyfile.exists() and len(tl) != 0:
for tunnels in tl:
sourcetl = str(dirname) + "/" + tunnels
tlname = CRYPTFILES + tunnels[:-5] + ".dat"
sourcetl = f"{dirname}/{tunnels}"
tlname = f"{CRYPTFILES}{tunnels[:-5]}.dat"
check_call(
[
"openssl",