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
b7259de4
Commit
b7259de4
authored
Jun 19, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added checks to __call__() method for better error handling/messages
parent
a828f715
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
lib/python/Products/ExternalMethod/ExternalMethod.py
lib/python/Products/ExternalMethod/ExternalMethod.py
+13
-1
No files found.
lib/python/Products/ExternalMethod/ExternalMethod.py
View file @
b7259de4
...
...
@@ -88,7 +88,7 @@
This product provides support for external methods, which allow
domain-specific customization of web environments.
"""
__version__
=
'$Revision: 1.4
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
4
$'
[
11
:
-
2
]
from
Globals
import
Persistent
,
DTMLFile
,
MessageDialog
,
HTML
import
OFS.SimpleItem
,
Acquisition
from
string
import
split
,
join
,
find
,
lower
...
...
@@ -245,6 +245,18 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Acquisition.Explicit,
first argument.
"""
filePath
=
self
.
filepath
()
if
filePath
==
None
:
raise
RuntimeError
,
\
"external method could not be called "
\
"because it is None"
if
not
os
.
path
.
exists
(
filePath
):
raise
RuntimeError
,
\
"external method could not be called "
\
"because the file does not exist"
if
DevelopmentMode
:
# If the file has been modified since last loaded, force a reload.
ts
=
os
.
stat
(
self
.
filepath
())[
stat
.
ST_MTIME
]
...
...
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