[or-cvs] r20560: {torctl} Quote SETCONF option values to allow values with spaces. Fou (torctl/branches/stable/python/TorCtl)

mikeperry at seul.org mikeperry at seul.org
Mon Sep 14 10:44:54 UTC 2009


Author: mikeperry
Date: 2009-09-14 06:44:54 -0400 (Mon, 14 Sep 2009)
New Revision: 20560

Modified:
   torctl/branches/stable/python/TorCtl/TorCtl.py
Log:

Quote SETCONF option values to allow values with spaces.
Found+fixed by ShanePancake.



Modified: torctl/branches/stable/python/TorCtl/TorCtl.py
===================================================================
--- torctl/branches/stable/python/TorCtl/TorCtl.py	2009-09-14 10:41:54 UTC (rev 20559)
+++ torctl/branches/stable/python/TorCtl/TorCtl.py	2009-09-14 10:44:54 UTC (rev 20560)
@@ -737,7 +737,7 @@
     """
     if not kvlist:
       return
-    msg = " ".join(["%s=%s"%(k,quote(v)) for k,v in kvlist])
+    msg = " ".join(["%s=\"%s\""%(k,quote(v)) for k,v in kvlist])
     self.sendAndRecv("SETCONF %s\r\n"%msg)
 
   def reset_options(self, keylist):



More information about the tor-commits mailing list