Skip to content

Commit

Permalink
Collector #2305: A comma inside an optional parameter of the
Browse files Browse the repository at this point in the history
parameter string broke the ZScriptHTML_tryParams function.
  • Loading branch information
zopyx committed Jun 18, 2001
1 parent 7e02bc7 commit 2e7ae43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions PythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
Python code.
"""

__version__='$Revision: 1.30 $'[11:-2]
__version__='$Revision: 1.31 $'[11:-2]

import sys, os, traceback, re, marshal
from Globals import DTMLFile, MessageDialog, package_home
Expand Down Expand Up @@ -241,10 +241,12 @@ def ZPythonScriptHTML_changePrefs(self, REQUEST, height=None, width=None,

def ZScriptHTML_tryParams(self):
"""Parameters to test the script with."""
print self._params
param_names = []
for name in self._params.split(','):

name = name.strip()
if name and name[0] != '*':
if name and name[0] != '*' and re.match('\w',name):
param_names.append(name.split('=', 1)[0])
return param_names

Expand Down

0 comments on commit 2e7ae43

Please sign in to comment.