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
e4d20950
Commit
e4d20950
authored
Jan 08, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added code to overcome Python 1.3 bug in string conversion functions.
parent
22ae7b71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
lib/python/ZPublisher/Publish.py
lib/python/ZPublisher/Publish.py
+14
-5
No files found.
lib/python/ZPublisher/Publish.py
View file @
e4d20950
...
...
@@ -504,7 +504,7 @@ Publishing a module using Fast CGI
o Configure the Fast CGI-enabled web server to execute this
file.
$Id: Publish.py,v 1.2
7 1996/12/30 14:36:12
jim Exp $"""
$Id: Publish.py,v 1.2
8 1997/01/08 23:22:45
jim Exp $"""
#'
# Copyright
#
...
...
@@ -557,6 +557,9 @@ $Id: Publish.py,v 1.27 1996/12/30 14:36:12 jim Exp $"""
# (540) 371-6909
#
# $Log: Publish.py,v $
# Revision 1.28 1997/01/08 23:22:45 jim
# Added code to overcome Python 1.3 bug in string conversion functions.
#
# Revision 1.27 1996/12/30 14:36:12 jim
# Fixed a spelling error.
#
...
...
@@ -672,7 +675,7 @@ $Id: Publish.py,v 1.27 1996/12/30 14:36:12 jim Exp $"""
#
#
#
__version__
=
'$Revision: 1.2
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
8
$'
[
11
:
-
2
]
def
main
():
...
...
@@ -1130,17 +1133,23 @@ def field2string(v):
def
field2int
(
v
):
try
:
v
=
v
.
read
()
except
:
v
=
str
(
v
)
return
string
.
atoi
(
v
)
# we can remove the check for an empty string when we go to python 1.4
if
v
:
return
string
.
atoi
(
v
)
raise
ValueError
,
'Empty entry when integer expected'
def
field2float
(
v
):
try
:
v
=
v
.
read
()
except
:
v
=
str
(
v
)
return
string
.
atof
(
v
)
# we can remove the check for an empty string when we go to python 1.4
if
v
:
return
string
.
atof
(
v
)
raise
ValueError
,
'Empty entry when floating-point number expected'
def
field2long
(
v
):
try
:
v
=
v
.
read
()
except
:
v
=
str
(
v
)
return
string
.
atol
(
v
)
# we can remove the check for an empty string when we go to python 1.4
if
v
:
return
string
.
atol
(
v
)
raise
ValueError
,
'Empty entry when integer expected'
def
field2Regex
(
v
):
try
:
v
=
v
.
read
()
...
...
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