Skip to content

Commit

Permalink
tc: fix flake8 issues
Browse files Browse the repository at this point in the history
  pytest_mh/utils/tc.py:88:90: E226 missing whitespace around arithmetic operator
  pytest_mh/utils/tc.py:123:84: E226 missing whitespace around arithmetic operator
  • Loading branch information
pbrezina committed Jun 12, 2024
1 parent d513330 commit 57cbba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytest_mh/utils/tc.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def add_delay(self, hostname: str, time: str | int):
commands = "set -e\n"
for interface in self.__interfaces:
commands += (
f"tc qdisc add dev {interface} parent 1:{self.__band} handle {self.__band*10}: netem "
f"tc qdisc add dev {interface} parent 1:{self.__band} handle {self.__band * 10}: netem "
f"delay {time_unit}\n"
)
for ip in ip_list:
Expand Down Expand Up @@ -120,6 +120,6 @@ def remove_delay(self, hostname: str):
for band in bands:
commands += f"tc filter del dev {interface} prio {band}\n"

commands += f"tc qdisc del dev {interface} parent 1:{band} handle {band*10}: netem\n"
commands += f"tc qdisc del dev {interface} parent 1:{band} handle {band * 10}: netem\n"

self.host.ssh.run(commands, log_level=SSHLog.Error)

0 comments on commit 57cbba4

Please sign in to comment.