From 394ebb269360ced1265cdd88e99dd9275e56b875 Mon Sep 17 00:00:00 2001 From: coderkun Date: Tue, 2 Dec 2014 20:09:35 +0100 Subject: [PATCH] mask protocol arguments --- mcg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcg.py b/mcg.py index a39378b..d8e189d 100644 --- a/mcg.py +++ b/mcg.py @@ -513,7 +513,7 @@ class Client(Base): def _write(self, command, args=None): if args is not None and len(args) > 0: - line = '{} "{}"\n'.format(command, '" "'.join(str(x) for x in args)) + line = '{} "{}"\n'.format(command, '" "'.join(str(x).replace('"', '\\\"') for x in args)) else: line = '{}\n'.format(command) self._logger.debug("write: %r", line)