[tor-dev] [PATCH 1/4] Remove some unused variables

Daniel Martí mvdan at mvdan.cc
Fri Aug 15 12:39:53 UTC 2014


Signed-off-by: Daniel Martí <mvdan at mvdan.cc>
---
 lib/chutney/TorNet.py  | 5 ++---
 lib/chutney/Traffic.py | 1 -
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 3685ec0..9d8efd1 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -297,7 +297,6 @@ class LocalNodeBuilder(NodeBuilder):
         """
         datadir = self._env['dir']
         tor = self._env['tor']
-        idfile = os.path.join(datadir,'keys',"identity_key")
         cmdline = [
             tor,
             "--quiet",
@@ -445,9 +444,9 @@ class LocalNodeController(NodeController):
     def hup(self):
         """Send a SIGHUP to this node, if it's running."""
         pid = self.getPid()
-        running = self.isRunning()
+        running = self.isRunning(pid)
         nick = self._env['nick']
-        if self.isRunning():
+        if running:
             print "Sending sighup to %s"%nick
             os.kill(pid, signal.SIGHUP)
             return True
diff --git a/lib/chutney/Traffic.py b/lib/chutney/Traffic.py
index 7202c3d..57250f7 100644
--- a/lib/chutney/Traffic.py
+++ b/lib/chutney/Traffic.py
@@ -312,7 +312,6 @@ import sys
 def main():
     """Test the TrafficTester by sending and receiving some data."""
     DATA = "a foo is a bar" * 1000
-    DATA_CORRUPT = "a foo is a baz" * 1000
     proxy = ('localhost', 9008)
     bind_to = ('localhost', int(sys.argv[1]))
 

-- 
Daniel Martí - mvdan at mvdan.cc - http://mvdan.cc/
PGP: A9DA 13CD F7A1 4ACD D3DE  E530 F4CA FFDB 4348 041C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20140815/00e95cd5/attachment.sig>


More information about the tor-dev mailing list