[tor-commits] [arm/master] Notice that multi-line input isn't implemented

atagar at torproject.org atagar at torproject.org
Mon Sep 19 04:46:18 UTC 2011


commit 0b68c433fd1b58bc628eb53234a656845ff18a57
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Sep 18 21:43:21 2011 -0700

    Notice that multi-line input isn't implemented
    
    A couple controller options (LOADCONF and POSTDESCRIPTOR) use multi-line
    controller input. However, this isn't yet implemented and probably won't be for
    the next release (those controller options really aren't very useful for the
    interpretor).
---
 src/util/torInterpretor.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/util/torInterpretor.py b/src/util/torInterpretor.py
index 825e502..3726517 100644
--- a/src/util/torInterpretor.py
+++ b/src/util/torInterpretor.py
@@ -787,6 +787,9 @@ class ControlInterpretor:
           conn.setOptions(paramList, isReset)
         except Exception, exc:
           outputEntry.append((str(exc), ERROR_FORMAT))
+      elif cmd.replace("+", "") in ("LOADCONF", "POSTDESCRIPTOR"):
+        # provides a notice that multi-line controller input isn't yet implemented
+        outputEntry.append((MULTILINE_UNIMPLEMENTED_NOTICE + "\n", ERROR_FORMAT))
       else:
         try:
           response = conn.getTorCtl().sendAndRecv("%s\r\n" % input)



More information about the tor-commits mailing list