Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
c328d480
Commit
c328d480
authored
Feb 10, 2002
by
Chris Withers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finally! I can edit PythonScripts via FTP and WebDAV with impunity :-)
parent
3e87ee7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
doc/CHANGES.txt
doc/CHANGES.txt
+7
-0
lib/python/Products/PythonScripts/PythonScript.py
lib/python/Products/PythonScripts/PythonScript.py
+2
-2
lib/python/Products/PythonScripts/tests/testPythonScript.py
lib/python/Products/PythonScripts/tests/testPythonScript.py
+4
-0
No files found.
doc/CHANGES.txt
View file @
c328d480
...
...
@@ -4,6 +4,13 @@ Zope Changes
Change information for previous versions of Zope can be found in the
file HISTORY.txt.
after Zope 2.5.1
- Fixed long standing bug in PythonScript where get_size returned
the incorrect length. This broke editing using EMACS via FTP or
WebDAV. Thanks to John Glavin at South River Technologies for
help finding the bug.
Zope 2.5.1 beta 1
Bugs Fixed
...
...
lib/python/Products/PythonScripts/PythonScript.py
View file @
c328d480
...
...
@@ -17,7 +17,7 @@ This product provides support for Script objects containing restricted
Python code.
"""
__version__
=
'$Revision: 1.
39
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
40
$'
[
11
:
-
2
]
import
sys
,
os
,
traceback
,
re
,
marshal
from
Globals
import
DTMLFile
,
MessageDialog
,
package_home
...
...
@@ -453,7 +453,7 @@ class PythonScript(Script, Historical, Cacheable):
def
params
(
self
):
return
self
.
_params
def
body
(
self
):
return
self
.
_body
def
get_size
(
self
):
return
len
(
self
.
_body
)
def
get_size
(
self
):
return
len
(
self
.
read
()
)
getSize
=
get_size
def
PrincipiaSearchSource
(
self
):
...
...
lib/python/Products/PythonScripts/tests/testPythonScript.py
View file @
c328d480
...
...
@@ -153,6 +153,10 @@ class TestPythonScriptNoAq(unittest.TestCase):
true
=
self
.
_newPS
(
readf
(
'boolean_map'
))()
assert
true
def
testGetSize
(
self
):
f
=
self
.
_newPS
(
readf
(
'complex_print'
))
self
.
assertEqual
(
f
.
get_size
(),
len
(
f
.
read
()))
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestPythonScriptNoAq
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment