mask protocol arguments

This commit is contained in:
coderkun 2014-12-02 20:09:35 +01:00
parent fab644fd47
commit 394ebb2693

2
mcg.py
View file

@ -513,7 +513,7 @@ class Client(Base):
def _write(self, command, args=None): def _write(self, command, args=None):
if args is not None and len(args) > 0: 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: else:
line = '{}\n'.format(command) line = '{}\n'.format(command)
self._logger.debug("write: %r", line) self._logger.debug("write: %r", line)