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

[tor-commits] [arm/release] Allowing for multiple GETINFO arguments



commit 2add4d9eb8fc53166a0d62a3881620ea1dcc22cd
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Sep 18 20:20:45 2011 -0700

    Allowing for multiple GETINFO arguments
    
    The control spec allows for multiple GETINFO arguments so respecting this,
    though including a newline between results so it's actually readable (yea, it's
    not what the control-spec says but I'm just a crazy rebel like that).
---
 src/util/torInterpretor.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/util/torInterpretor.py b/src/util/torInterpretor.py
index f0d0639..963a465 100644
--- a/src/util/torInterpretor.py
+++ b/src/util/torInterpretor.py
@@ -658,8 +658,9 @@ class ControlInterpretor:
       
       if cmd == "GETINFO":
         try:
-          response = conn.getInfo(arg, suppressExc = False)
-          outputEntry.append((response, OUTPUT_FORMAT))
+          for param in arg.split():
+            response = conn.getInfo(param, suppressExc = False)
+            outputEntry.append((response + "\n", OUTPUT_FORMAT))
         except Exception, exc:
           outputEntry.append((str(exc), ERROR_FORMAT))
       elif cmd == "SETCONF" or cmd == "RESETCONF":



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