Fix syntax error for Python versions earlier than 3.12.

This commit ensures compatibility with older Python versions by correcting a syntax error in f-strings. The fix involves using single quotes inside the f-string to avoid mismatched parentheses.

Commit 84e01967e2 should also include this change.

Signed-off-by: Ludovico Piero <lewdovico@gnuweeb.org>
This commit is contained in:
Ludovico Piero
2024-05-03 14:32:55 +09:00
parent 64546290b6
commit f43eda16b3
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ def hyprctl(cmd):
f"{xdg_runtime_dir}/hypr") else "/tmp/hypr"
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect(f"{hypr_dir}/{os.getenv("HYPRLAND_INSTANCE_SIGNATURE")}/.socket.sock")
s.connect(f"{hypr_dir}/{os.getenv('HYPRLAND_INSTANCE_SIGNATURE')}/.socket.sock")
s.send(cmd.encode("utf-8"))
output = s.recv(20480).decode('utf-8')

View File

@@ -827,7 +827,7 @@ def hyprctl(cmd, buf_size=2048):
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
try:
s.connect(f"{hypr_dir}/{os.getenv("HYPRLAND_INSTANCE_SIGNATURE")}/.socket.sock")
s.connect(f"{hypr_dir}/{os.getenv('HYPRLAND_INSTANCE_SIGNATURE')}/.socket.sock")
s.send(cmd.encode("utf-8"))
output = b""