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
1fdadc8f
Commit
1fdadc8f
authored
Sep 07, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merged fix 1590 from 2.2 branch
parent
a461b5ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lib/python/Shared/DC/ZRDB/sqlvar.py
lib/python/Shared/DC/ZRDB/sqlvar.py
+10
-4
No files found.
lib/python/Shared/DC/ZRDB/sqlvar.py
View file @
1fdadc8f
...
...
@@ -119,7 +119,7 @@
however, if x is ommitted or an empty string, then the value
inserted is 'null'.
'''
__rcs_id__
=
'$Id: sqlvar.py,v 1.1
0 2000/08/07 20:17:16
brian Exp $'
__rcs_id__
=
'$Id: sqlvar.py,v 1.1
1 2000/09/07 17:04:07
brian Exp $'
############################################################################
# Copyright
...
...
@@ -129,7 +129,7 @@ __rcs_id__='$Id: sqlvar.py,v 1.10 2000/08/07 20:17:16 brian Exp $'
# rights reserved.
#
############################################################################
__version__
=
'$Revision: 1.1
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
1
$'
[
11
:
-
2
]
from
DocumentTemplate.DT_Util
import
ParseError
,
parse_params
,
name_param
from
string
import
find
,
split
,
join
,
atoi
,
atof
...
...
@@ -172,7 +172,10 @@ class SQLVar:
if
t
==
'int'
:
try
:
if
type
(
v
)
is
StringType
:
atoi
(
v
)
if
type
(
v
)
is
StringType
:
if
v
[
-
1
:]
==
'L'
:
v
=
v
[:
-
1
]
atoi
(
v
)
else
:
v
=
str
(
int
(
v
))
except
:
if
not
v
and
args
.
has_key
(
'optional'
)
and
args
[
'optional'
]:
...
...
@@ -181,7 +184,10 @@ class SQLVar:
'Invalid integer value for <em>%s</em>'
%
name
)
elif
t
==
'float'
:
try
:
if
type
(
v
)
is
StringType
:
atof
(
v
)
if
type
(
v
)
is
StringType
:
if
v
[
-
1
:]
==
'L'
:
v
=
v
[:
-
1
]
atof
(
v
)
else
:
v
=
str
(
float
(
v
))
except
:
if
not
v
and
args
.
has_key
(
'optional'
)
and
args
[
'optional'
]:
...
...
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