[tor-commits] [chutney/master] Use pathlib Path.rename when renaming pidfile
nickm at torproject.org
nickm at torproject.org
Mon Jul 20 15:33:44 UTC 2020
commit c9ad298ec414ef991e7b4885c0d623237e0d03cc
Author: David Goulet <dgoulet at torproject.org>
Date: Mon Jul 20 10:53:00 2020 -0400
Use pathlib Path.rename when renaming pidfile
Missing artefact from the pathlib migration.
Signed-off-by: David Goulet <dgoulet at torproject.org>
---
lib/chutney/TorNet.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index bdb2c0b..c832b9f 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -1209,7 +1209,7 @@ class LocalNodeController(NodeController):
if not self.isRunning() and pidfile.exists():
debug("Renaming stale pid file for {} ..."
.format(self._env['nick']))
- os.rename(pidfile, pidfile + ".old")
+ pidfile.rename(pidfile.with_suffix(".old"))
def waitOnLaunch(self):
"""Check whether we can wait() for the tor process to launch"""
More information about the tor-commits
mailing list