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
1185d4ee
Commit
1185d4ee
authored
Jan 08, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zLOG -> logging
parent
c6713a93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
lib/python/Shared/DC/ZRDB/Connection.py
lib/python/Shared/DC/ZRDB/Connection.py
+9
-9
No files found.
lib/python/Shared/DC/ZRDB/Connection.py
View file @
1185d4ee
...
...
@@ -15,6 +15,7 @@ __doc__='''Generic Database Connection Support
$Id$'''
__version__
=
'$Revision: 1.39 $'
[
11
:
-
2
]
from
logging
import
getLogger
import
Globals
,
OFS
.
SimpleItem
,
AccessControl
.
Role
,
Acquisition
,
sys
from
DateTime
import
DateTime
from
App.Dialogs
import
MessageDialog
...
...
@@ -30,11 +31,14 @@ from Aqueduct import custom_default_report
from
cStringIO
import
StringIO
from
Results
import
Results
from
sys
import
exc_info
from
zLOG
import
LOG
,
ERROR
from
cgi
import
escape
import
DocumentTemplate
,
RDB
from
zExceptions
import
BadRequest
LOG
=
getLogger
(
'ZRDB.Connection'
)
class
Connection
(
Globals
.
Persistent
,
AccessControl
.
Role
.
RoleManager
,
...
...
@@ -67,10 +71,8 @@ class Connection(
if
self
.
connection_string
:
try
:
self
.
connect
(
self
.
connection_string
)
except
:
LOG
(
'Shared.DC.ZRDB.Connection'
,
ERROR
,
'Error connecting to relational database.'
,
error
=
exc_info
())
LOG
.
error
(
'Error connecting to relational database.'
,
exc_info
=
exc_info
())
def
title_and_id
(
self
):
s
=
Connection
.
inheritedAttribute
(
'title_and_id'
)(
self
)
...
...
@@ -157,10 +159,8 @@ class Connection(
if
hasattr
(
self
,
'_v_database_connection'
):
self
.
_v_database_connection
.
close
()
except
:
LOG
(
'Shared.DC.ZRDB.Connection'
,
ERROR
,
'Error closing relational database connection.'
,
error
=
exc_info
())
LOG
.
error
(
'Error closing relational database connection.'
,
exc_info
=
exc_info
())
self
.
_v_connected
=
''
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
)
...
...
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