[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Whitespace fixes



commit 368fedfaffc6e86dc8febd1d6d82e54f91b6ad01
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Nov 25 14:01:18 2012 -0800

    Whitespace fixes
    
    The prior couple patches lacked whitespace on empty lines, causing our
    whitespace checker to complain. I wonder if I should stop fighting with the
    world here - they're clearly wrong, but I'm pretty alone in this...
---
 stem/control.py                  |   10 +++++-----
 test/integ/control/controller.py |   12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/stem/control.py b/stem/control.py
index 0b7baee..cd990d8 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -1272,23 +1272,23 @@ class Controller(BaseController):
   def close_circuit(self, circuit_id, flag = ''):
     """
     Closes the specified circuit.
-
+    
     :param int circuit_id: id of the circuit to be closed
     :param str flag: optional value to modify closing, the only flag available
       is "IfUnused" which will not close the circuit unless it is unused
-
+    
     :raises: :class:`stem.InvalidArguments` if the circuit doesn't exist or not enough information is provided
     """
-
+    
     response = self.msg("CLOSECIRCUIT %s %s"% (str(circuit_id), flag))
     stem.response.convert("SINGLELINE", response)
-
+    
     if not response.is_ok():
       if response.code in ('512', '552'):
         raise stem.InvalidRequest(response.code, response.message)
       else:
         raise stem.ProtocolError("CLOSECIRCUIT returned unexpected response code: %s" % response.code)
-
+  
   def map_address(self, mapping):
     """
     Map addresses to replacement addresses. Tor replaces subseqent connections
diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index 6a000c2..1ba06bb 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -410,28 +410,28 @@ class TestController(unittest.TestCase):
     """
     Tests Controller.close_circuit with valid and invalid input.
     """
-
+    
     if test.runner.require_control(self): return
     elif test.runner.require_online(self): return
-
+    
     runner = test.runner.get_runner()
-
+    
     with runner.get_tor_controller() as controller:
       circ_id = controller.new_circuit()
       controller.close_circuit(circ_id)
       circuit_output = controller.get_info("circuit-status")
       circ = [x.split()[0] for x in circuit_output.splitlines()]
       self.assertFalse(circ_id in circ)
-
+      
       circ_id = controller.new_circuit()
       controller.close_circuit(circ_id, "IfUnused")
       circuit_output = controller.get_info("circuit-status")
       circ = [x.split()[0] for x in circuit_output.splitlines()]
       self.assertFalse(circ_id in circ)
-
+      
       circ_id = controller.new_circuit()
       self.assertRaises(stem.InvalidRequest, controller.close_circuit, circ_id + 1024)
-
+  
   def test_mapaddress(self):
     if test.runner.require_control(self): return
     elif test.runner.require_online(self): return

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits