Skip to content

Commit ecabacb

Browse files
core: libs: commonwealth: DHCPServerManager: Use asyncio.sleep over time.sleep for async function
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent b17687e commit ecabacb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/libs/commonwealth/commonwealth/utils/DHCPServerManager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def start(self) -> None:
118118
logger.info("Command: " + " ".join(self.command_list()))
119119
# pylint: disable=consider-using-with
120120
self._subprocess = subprocess.Popen(self.command_list(), shell=False, encoding="utf-8", errors="ignore")
121-
time.sleep(3)
121+
await asyncio.sleep(3)
122122
if not self.is_running():
123123
exit_code = self._subprocess.returncode
124124
raise RuntimeError(f"Failed to initialize Dnsmasq ({exit_code}).")

0 commit comments

Comments
 (0)