# HG changeset patch # User paulb # Date 1128300465 0 # Node ID 67594e0064b8d01fc5207e1beced7c52c74b4c63 # Parent 31aad4a05832bb2a9a5ff61ac8c0f9db2e4711c1 [project @ 2005-10-03 00:47:45 by paulb] Added a sanity check to signal non-collection input to the get_result and send_output methods. diff -r 31aad4a05832 -r 67594e0064b8 XSLForms/Resources.py --- a/XSLForms/Resources.py Sun Oct 02 15:47:25 2005 +0000 +++ b/XSLForms/Resources.py Mon Oct 03 00:47:45 2005 +0000 @@ -151,6 +151,11 @@ 'references' to external documents. """ + # Sanity check for the filenames list. + + if isinstance(stylesheet_filenames, str) or isinstance(stylesheet_filenames, unicode): + raise ValueError, stylesheet_filenames + proc = XSLOutput.Processor(stylesheet_filenames, parameters=stylesheet_parameters, references=references) proc.send_output(trans.get_response_stream(), trans.get_response_stream_encoding(), document) @@ -165,6 +170,11 @@ external documents. """ + # Sanity check for the filenames list. + + if isinstance(stylesheet_filenames, str) or isinstance(stylesheet_filenames, unicode): + raise ValueError, stylesheet_filenames + proc = XSLOutput.Processor(stylesheet_filenames, parameters=stylesheet_parameters, references=references) return proc.get_result(document)