diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-20 17:37:31 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-20 17:37:31 -0400 |
commit | f0ea26424119393a7c4baea4dab215af0c7bc9c4 (patch) | |
tree | e0dd15b3ead5ca9ccdcebe31a431bb0fe032c95b /interfaces/email/interactive/be-handle-mail | |
parent | 84a9c8a8b93b45940d194ce898f7f3ca2adfe8e4 (diff) | |
download | bugseverywhere-f0ea26424119393a7c4baea4dab215af0c7bc9c4.tar.gz |
Use shlex.split() to parse control lines in be-handle-mail.
Split arguments following POSIX rather than at all whitespace.
Diffstat (limited to 'interfaces/email/interactive/be-handle-mail')
-rwxr-xr-x | interfaces/email/interactive/be-handle-mail | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index d1c9451..f457b6a 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -42,17 +42,19 @@ import cStringIO as StringIO import email from email.mime.multipart import MIMEMultipart import email.utils -import libbe.cmdutil, libbe.encoding, libbe.utility import os import os.path import re -import send_pgp_mime +import shlex import sys import time import traceback import doctest import unittest +import libbe.cmdutil, libbe.encoding, libbe.utility +import send_pgp_mime + HANDLER_ADDRESS = u"BE Bugs <wking@thor.physics.drexel.edu>" _THIS_DIR = os.path.abspath(os.path.dirname(__file__)) BE_DIR = _THIS_DIR @@ -452,7 +454,7 @@ class Message (object): continue if line.startswith(BREAK): break - fields = line.split() + fields = shlex.split(line) command,args = (fields[0], fields[1:]) commands.append(Command(self, command, args)) if len(commands) == 0: |