commit 53a356cda5dba37264020ea2810a1ae0374e13c0 Author: Daniel Martí mvdan@mvdan.cc Date: Thu Aug 21 17:40:54 2014 +0200
Remove a couple of unnecessary variables --- lib/chutney/TorNet.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py index d343688..872ff8d 100644 --- a/lib/chutney/TorNet.py +++ b/lib/chutney/TorNet.py @@ -439,10 +439,9 @@ class LocalNodeController(NodeController): """ # XXX Split this into "check" and "print" parts. pid = self.getPid() - running = self.isRunning(pid) nick = self._env['nick'] datadir = self._env['dir'] - if running: + if self.isRunning(pid): if listRunning: print "%s is running with PID %s" % (nick, pid) return True @@ -459,9 +458,8 @@ class LocalNodeController(NodeController): def hup(self): """Send a SIGHUP to this node, if it's running.""" pid = self.getPid() - running = self.isRunning(pid) nick = self._env['nick'] - if running: + if self.isRunning(pid): print "Sending sighup to %s" % nick os.kill(pid, signal.SIGHUP) return True
tor-commits@lists.torproject.org