Skip to content

Commit 0d14f12

Browse files
author
Richard Jones
committed
better string splitting
1 parent d449ab4 commit 0d14f12

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

roundup/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: admin.py,v 1.52 2003-04-17 07:33:08 richard Exp $
19+
# $Id: admin.py,v 1.53 2003-05-09 03:32:41 richard Exp $
2020

2121
'''Administration commands for maintaining Roundup trackers.
2222
'''
2323

24-
import sys, os, getpass, getopt, re, UserDict, shlex, shutil, rfc822
24+
import sys, os, getpass, getopt, re, UserDict, shutil, rfc822
2525
try:
2626
import csv
2727
except ImportError:

roundup/cgi/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.115 2003-05-09 01:47:50 richard Exp $
1+
# $Id: client.py,v 1.116 2003-05-09 03:32:41 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -8,7 +8,7 @@
88
import binascii, Cookie, time, random, MimeWriter, smtplib, socket, quopri
99
import stat, rfc822, string
1010

11-
from roundup import roundupdb, date, hyperdb, password
11+
from roundup import roundupdb, date, hyperdb, password, token
1212
from roundup.i18n import _
1313
from roundup.cgi.templating import Templates, HTMLRequest, NoTemplate
1414
from roundup.cgi import cgitb
@@ -1323,8 +1323,8 @@ def searchAction(self, wcre=re.compile(r'[\s,]+')):
13231323
continue
13241324
if isinstance(props[key], hyperdb.String):
13251325
v = self.form[key].value
1326-
l = wcre.split(v)
1327-
if len(l) > 1:
1326+
l = token.token_split(v)
1327+
if len(l) > 1 or l[0] != v:
13281328
self.form.value.remove(self.form[key])
13291329
# replace the single value with the split list
13301330
for v in l:

0 commit comments

Comments
 (0)